diff --git a/system/helpers/array_helper.php b/system/helpers/array_helper.php
index 85d0379..236e390 100644
--- a/system/helpers/array_helper.php
+++ b/system/helpers/array_helper.php
@@ -39,14 +39,17 @@
  * @param	mixed
  * @return	mixed	depends on what the array contains
  */	
-function element($item, $array, $default = FALSE)
+if (! function_exists('element'))
 {
-	if ( ! isset($array[$item]) OR $array[$item] == "")
+	function element($item, $array, $default = FALSE)
 	{
-		return $default;
-	}
+		if ( ! isset($array[$item]) OR $array[$item] == "")
+		{
+			return $default;
+		}
 
-	return $array[$item];
+		return $array[$item];
+	}	
 }
 
 // ------------------------------------------------------------------------
@@ -58,14 +61,16 @@
  * @param	array
  * @return	mixed	depends on what the array contains
  */	
-function random_element($array)
+if (! function_exists('random_element'))
 {
-	if ( ! is_array($array))
+	function random_element($array)
 	{
-		return $array;
-	}
-	return $array[array_rand($array)];
+		if ( ! is_array($array))
+		{
+			return $array;
+		}
+		return $array[array_rand($array)];
+	}	
 }
 
-
 ?>
\ No newline at end of file
diff --git a/system/helpers/cookie_helper.php b/system/helpers/cookie_helper.php
index 2a4a963..102057f 100644
--- a/system/helpers/cookie_helper.php
+++ b/system/helpers/cookie_helper.php
@@ -42,52 +42,55 @@
  * @param	string	the cookie prefix
  * @return	void
  */
-function set_cookie($name = '', $value = '', $expire = '', $domain = '', $path = '/', $prefix = '')
+if (! function_exists('set_cookie'))
 {
-	if (is_array($name))
-	{		
-		foreach (array('value', 'expire', 'domain', 'path', 'prefix', 'name') as $item)
-		{
-			if (isset($name[$item]))
+	function set_cookie($name = '', $value = '', $expire = '', $domain = '', $path = '/', $prefix = '')
+	{
+		if (is_array($name))
+		{		
+			foreach (array('value', 'expire', 'domain', 'path', 'prefix', 'name') as $item)
 			{
-				$$item = $name[$item];
+				if (isset($name[$item]))
+				{
+					$$item = $name[$item];
+				}
 			}
 		}
-	}
 	
-	// Set the config file options
-	$CI =& get_instance();
+		// Set the config file options
+		$CI =& get_instance();
 	
-	if ($prefix == '' AND $CI->config->item('cookie_prefix') != '')
-	{
-		$prefix = $CI->config->item('cookie_prefix');
-	}
-	if ($domain == '' AND $CI->config->item('cookie_domain') != '')
-	{
-		$domain = $CI->config->item('cookie_domain');
-	}
-	if ($path == '/' AND $CI->config->item('cookie_path') != '/')
-	{
-		$path = $CI->config->item('cookie_path');
-	}
-		
-	if ( ! is_numeric($expire))
-	{
-		$expire = time() - 86500;
-	}
-	else
-	{
-		if ($expire > 0)
+		if ($prefix == '' AND $CI->config->item('cookie_prefix') != '')
 		{
-			$expire = time() + $expire;
+			$prefix = $CI->config->item('cookie_prefix');
+		}
+		if ($domain == '' AND $CI->config->item('cookie_domain') != '')
+		{
+			$domain = $CI->config->item('cookie_domain');
+		}
+		if ($path == '/' AND $CI->config->item('cookie_path') != '/')
+		{
+			$path = $CI->config->item('cookie_path');
+		}
+		
+		if ( ! is_numeric($expire))
+		{
+			$expire = time() - 86500;
 		}
 		else
 		{
-			$expire = 0;
+			if ($expire > 0)
+			{
+				$expire = time() + $expire;
+			}
+			else
+			{
+				$expire = 0;
+			}
 		}
-	}
 	
-	setcookie($prefix.$name, $value, $expire, $path, $domain, 0);
+		setcookie($prefix.$name, $value, $expire, $path, $domain, 0);
+	}
 }
 	
 // --------------------------------------------------------------------
@@ -100,10 +103,13 @@
  * @param	bool
  * @return	mixed
  */
-function get_cookie($index = '', $xss_clean = FALSE)
+if (! function_exists('get_cookie'))
 {
-	$CI =& get_instance();
-	return $CI->input->cookie($index, $xss_clean);
+	function get_cookie($index = '', $xss_clean = FALSE)
+	{
+		$CI =& get_instance();
+		return $CI->input->cookie($index, $xss_clean);
+	}
 }
 
 // --------------------------------------------------------------------
@@ -117,10 +123,12 @@
  * @param	string	the cookie prefix
  * @return	void
  */
-function delete_cookie($name = '', $domain = '', $path = '/', $prefix = '')
+if (! function_exists('delete_cookie'))
 {
-	set_cookie($name, '', '', $domain, $path, $prefix);
+	function delete_cookie($name = '', $domain = '', $path = '/', $prefix = '')
+	{
+		set_cookie($name, '', '', $domain, $path, $prefix);
+	}
 }
 
-
 ?>
\ No newline at end of file
diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php
index 9f4c66b..24e0b17 100644
--- a/system/helpers/date_helper.php
+++ b/system/helpers/date_helper.php
@@ -35,26 +35,29 @@
  * @access	public
  * @return	integer
  */	
-function now()
+if (! function_exists('now'))
 {
-	$CI =& get_instance();
-	
-	if (strtolower($CI->config->item('time_reference')) == 'gmt')
+	function now()
 	{
-		$now = time();
-		$system_time = mktime(gmdate("H", $now), gmdate("i", $now), gmdate("s", $now), gmdate("m", $now), gmdate("d", $now), gmdate("Y", $now));
+		$CI =& get_instance();
 	
-		if (strlen($system_time) < 10)
+		if (strtolower($CI->config->item('time_reference')) == 'gmt')
 		{
-			$system_time = time();
-			log_message('error', 'The Date class could not set a proper GMT timestamp so the local time() value was used.');
-		}
+			$now = time();
+			$system_time = mktime(gmdate("H", $now), gmdate("i", $now), gmdate("s", $now), gmdate("m", $now), gmdate("d", $now), gmdate("Y", $now));
 	
-		return $system_time;
-	}
-	else
-	{
-		return time();
+			if (strlen($system_time) < 10)
+			{
+				$system_time = time();
+				log_message('error', 'The Date class could not set a proper GMT timestamp so the local time() value was used.');
+			}
+	
+			return $system_time;
+		}
+		else
+		{
+			return time();
+		}
 	}
 }
 	
@@ -77,16 +80,19 @@
  * @param	integer
  * @return	integer
  */	
-function mdate($datestr = '', $time = '')
+if (! function_exists('mdate'))
 {
-	if ($datestr == '')
-		return '';
+	function mdate($datestr = '', $time = '')
+	{
+		if ($datestr == '')
+			return '';
 	
-	if ($time == '')
-		$time = now();
+		if ($time == '')
+			$time = now();
 		
-	$datestr = str_replace('%\\', '', preg_replace("/([a-z]+?){1}/i", "\\\\\\1", $datestr));
-	return date($datestr, $time);
+		$datestr = str_replace('%\\', '', preg_replace("/([a-z]+?){1}/i", "\\\\\\1", $datestr));
+		return date($datestr, $time);
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -101,28 +107,30 @@
  * @param	integer	Unix timestamp
  * @return	string
  */	
-function standard_date($fmt = 'DATE_RFC822', $time = '')
+if (! function_exists('standard_date'))
 {
-	$formats = array(
-					'DATE_ATOM'		=>	'%Y-%m-%dT%H:%i:%s%Q',
-					'DATE_COOKIE'	=>	'%l, %d-%M-%y %H:%i:%s UTC',
-					'DATE_ISO8601'	=>	'%Y-%m-%dT%H:%i:%s%O',
-					'DATE_RFC822'	=>	'%D, %d %M %y %H:%i:%s %O',
-					'DATE_RFC850'	=>	'%l, %d-%M-%y %H:%m:%i UTC',
-					'DATE_RFC1036'	=>	'%D, %d %M %y %H:%i:%s %O',
-					'DATE_RFC1123'	=>	'%D, %d %M %Y %H:%i:%s %O',
-					'DATE_RSS'		=>	'%D, %d %M %Y %H:%i:%s %O',
-					'DATE_W3C'		=>	'%Y-%m-%dT%H:%i:%s%Q'
-					);
-
-	if ( ! isset($formats[$fmt]))
+	function standard_date($fmt = 'DATE_RFC822', $time = '')
 	{
-		return FALSE;
-	}
-	
-	return mdate($formats[$fmt], $time);
-}
+		$formats = array(
+						'DATE_ATOM'		=>	'%Y-%m-%dT%H:%i:%s%Q',
+						'DATE_COOKIE'	=>	'%l, %d-%M-%y %H:%i:%s UTC',
+						'DATE_ISO8601'	=>	'%Y-%m-%dT%H:%i:%s%O',
+						'DATE_RFC822'	=>	'%D, %d %M %y %H:%i:%s %O',
+						'DATE_RFC850'	=>	'%l, %d-%M-%y %H:%m:%i UTC',
+						'DATE_RFC1036'	=>	'%D, %d %M %y %H:%i:%s %O',
+						'DATE_RFC1123'	=>	'%D, %d %M %Y %H:%i:%s %O',
+						'DATE_RSS'		=>	'%D, %d %M %Y %H:%i:%s %O',
+						'DATE_W3C'		=>	'%Y-%m-%dT%H:%i:%s%Q'
+						);
 
+		if ( ! isset($formats[$fmt]))
+		{
+			return FALSE;
+		}
+	
+		return mdate($formats[$fmt], $time);
+	}
+}
 	
 // ------------------------------------------------------------------------
 
@@ -137,105 +145,108 @@
  * @param	integer	Unix timestamp
  * @return	integer
  */	
-function timespan($seconds = 1, $time = '')
+if (! function_exists('timespan'))
 {
-	$CI =& get_instance();
-	$CI->lang->load('date');
+	function timespan($seconds = 1, $time = '')
+	{
+		$CI =& get_instance();
+		$CI->lang->load('date');
 
-	if ( ! is_numeric($seconds))
-	{
-		$seconds = 1;
-	}
+		if ( ! is_numeric($seconds))
+		{
+			$seconds = 1;
+		}
 	
-	if ( ! is_numeric($time))
-	{
-		$time = time();
-	}
+		if ( ! is_numeric($time))
+		{
+			$time = time();
+		}
 	
-	if ($time <= $seconds)
-	{
-		$seconds = 1;
-	}
-	else
-	{
-		$seconds = $time - $seconds;
-	}
+		if ($time <= $seconds)
+		{
+			$seconds = 1;
+		}
+		else
+		{
+			$seconds = $time - $seconds;
+		}
 		
-	$str = '';
-	$years = floor($seconds / 31536000);
+		$str = '';
+		$years = floor($seconds / 31536000);
 	
-	if ($years > 0)
-	{	
-		$str .= $years.' '.$CI->lang->line((($years	> 1) ? 'date_years' : 'date_year')).', ';
-	}	
-	
-	$seconds -= $years * 31536000;
-	$months = floor($seconds / 2628000);
-	
-	if ($years > 0 OR $months > 0)
-	{
-		if ($months > 0)
+		if ($years > 0)
 		{	
-			$str .= $months.' '.$CI->lang->line((($months	> 1) ? 'date_months' : 'date_month')).', ';
+			$str .= $years.' '.$CI->lang->line((($years	> 1) ? 'date_years' : 'date_year')).', ';
 		}	
 	
-		$seconds -= $months * 2628000;
-	}
-
-	$weeks = floor($seconds / 604800);
+		$seconds -= $years * 31536000;
+		$months = floor($seconds / 2628000);
 	
-	if ($years > 0 OR $months > 0 OR $weeks > 0)
-	{
-		if ($weeks > 0)
-		{	
-			$str .= $weeks.' '.$CI->lang->line((($weeks	> 1) ? 'date_weeks' : 'date_week')).', ';
-		}
-		
-		$seconds -= $weeks * 604800;
-	}			
-
-	$days = floor($seconds / 86400);
-	
-	if ($months > 0 OR $weeks > 0 OR $days > 0)
-	{
-		if ($days > 0)
-		{	
-			$str .= $days.' '.$CI->lang->line((($days	> 1) ? 'date_days' : 'date_day')).', ';
-		}
-	
-		$seconds -= $days * 86400;
-	}
-	
-	$hours = floor($seconds / 3600);
-	
-	if ($days > 0 OR $hours > 0)
-	{
-		if ($hours > 0)
+		if ($years > 0 OR $months > 0)
 		{
-			$str .= $hours.' '.$CI->lang->line((($hours	> 1) ? 'date_hours' : 'date_hour')).', ';
+			if ($months > 0)
+			{	
+				$str .= $months.' '.$CI->lang->line((($months	> 1) ? 'date_months' : 'date_month')).', ';
+			}	
+	
+			$seconds -= $months * 2628000;
 		}
+
+		$weeks = floor($seconds / 604800);
+	
+		if ($years > 0 OR $months > 0 OR $weeks > 0)
+		{
+			if ($weeks > 0)
+			{	
+				$str .= $weeks.' '.$CI->lang->line((($weeks	> 1) ? 'date_weeks' : 'date_week')).', ';
+			}
 		
-		$seconds -= $hours * 3600;
-	}
+			$seconds -= $weeks * 604800;
+		}			
+
+		$days = floor($seconds / 86400);
 	
-	$minutes = floor($seconds / 60);
+		if ($months > 0 OR $weeks > 0 OR $days > 0)
+		{
+			if ($days > 0)
+			{	
+				$str .= $days.' '.$CI->lang->line((($days	> 1) ? 'date_days' : 'date_day')).', ';
+			}
 	
-	if ($days > 0 OR $hours > 0 OR $minutes > 0)
-	{
-		if ($minutes > 0)
-		{	
-			$str .= $minutes.' '.$CI->lang->line((($minutes	> 1) ? 'date_minutes' : 'date_minute')).', ';
+			$seconds -= $days * 86400;
 		}
-		
-		$seconds -= $minutes * 60;
-	}
 	
-	if ($str == '')
-	{
-		$str .= $seconds.' '.$CI->lang->line((($seconds	> 1) ? 'date_seconds' : 'date_second')).', ';
-	}
+		$hours = floor($seconds / 3600);
+	
+		if ($days > 0 OR $hours > 0)
+		{
+			if ($hours > 0)
+			{
+				$str .= $hours.' '.$CI->lang->line((($hours	> 1) ? 'date_hours' : 'date_hour')).', ';
+			}
+		
+			$seconds -= $hours * 3600;
+		}
+	
+		$minutes = floor($seconds / 60);
+	
+		if ($days > 0 OR $hours > 0 OR $minutes > 0)
+		{
+			if ($minutes > 0)
+			{	
+				$str .= $minutes.' '.$CI->lang->line((($minutes	> 1) ? 'date_minutes' : 'date_minute')).', ';
+			}
+		
+			$seconds -= $minutes * 60;
+		}
+	
+		if ($str == '')
+		{
+			$str .= $seconds.' '.$CI->lang->line((($seconds	> 1) ? 'date_seconds' : 'date_second')).', ';
+		}
 			
-	return substr(trim($str), 0, -1);
+		return substr(trim($str), 0, -1);
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -251,28 +262,31 @@
  * @param	integer	a numeric year
  * @return	integer
  */	
-function days_in_month($month = 0, $year = '')
+if (! function_exists('days_in_month'))
 {
-	if ($month < 1 OR $month > 12)
+	function days_in_month($month = 0, $year = '')
 	{
-		return 0;
-	}
-	
-	if ( ! is_numeric($year) OR strlen($year) != 4)
-	{
-		$year = date('Y');
-	}
-	
-	if ($month == 2)
-	{
-		if ($year % 400 == 0 OR ($year % 4 == 0 AND $year % 100 != 0))
+		if ($month < 1 OR $month > 12)
 		{
-			return 29;
+			return 0;
 		}
-	}
+	
+		if ( ! is_numeric($year) OR strlen($year) != 4)
+		{
+			$year = date('Y');
+		}
+	
+		if ($month == 2)
+		{
+			if ($year % 400 == 0 OR ($year % 4 == 0 AND $year % 100 != 0))
+			{
+				return 29;
+			}
+		}
 
-	$days_in_month	= array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
-	return $days_in_month[$month - 1];
+		$days_in_month	= array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
+		return $days_in_month[$month - 1];
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -284,12 +298,15 @@
  * @param	integer Unix timestamp
  * @return	integer
  */	
-function local_to_gmt($time = '')
+if (! function_exists('local_to_gmt'))
 {
-	if ($time == '')
-		$time = time();
+	function local_to_gmt($time = '')
+	{
+		if ($time == '')
+			$time = time();
 	
-	return mktime( gmdate("H", $time), gmdate("i", $time), gmdate("s", $time), gmdate("m", $time), gmdate("d", $time), gmdate("Y", $time));
+		return mktime( gmdate("H", $time), gmdate("i", $time), gmdate("s", $time), gmdate("m", $time), gmdate("d", $time), gmdate("Y", $time));
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -307,21 +324,24 @@
  * @param	bool	whether DST is active
  * @return	integer
  */	
-function gmt_to_local($time = '', $timezone = 'UTC', $dst = FALSE)
-{			
-	if ($time == '')
-	{
-		return now();
-	}
+if (! function_exists('gmt_to_local'))
+{
+	function gmt_to_local($time = '', $timezone = 'UTC', $dst = FALSE)
+	{			
+		if ($time == '')
+		{
+			return now();
+		}
 	
-	$time += timezones($timezone) * 3600;
+		$time += timezones($timezone) * 3600;
 
-	if ($dst == TRUE)
-	{
-		$time += 3600;
-	}
+		if ($dst == TRUE)
+		{
+			$time += 3600;
+		}
 	
-	return $time;
+		return $time;
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -333,25 +353,28 @@
  * @param	integer Unix timestamp
  * @return	integer
  */	
-function mysql_to_unix($time = '')
+if (! function_exists('mysql_to_unix'))
 {
-	// We'll remove certain characters for backward compatibility
-	// since the formatting changed with MySQL 4.1
-	// YYYY-MM-DD HH:MM:SS
+	function mysql_to_unix($time = '')
+	{
+		// We'll remove certain characters for backward compatibility
+		// since the formatting changed with MySQL 4.1
+		// YYYY-MM-DD HH:MM:SS
 	
-	$time = str_replace('-', '', $time);
-	$time = str_replace(':', '', $time);
-	$time = str_replace(' ', '', $time);
+		$time = str_replace('-', '', $time);
+		$time = str_replace(':', '', $time);
+		$time = str_replace(' ', '', $time);
 	
-	// YYYYMMDDHHMMSS
-	return  mktime(
-					substr($time, 8, 2),
-					substr($time, 10, 2),
-					substr($time, 12, 2),
-					substr($time, 4, 2),
-					substr($time, 6, 2),
-					substr($time, 0, 4)
-					);
+		// YYYYMMDDHHMMSS
+		return  mktime(
+						substr($time, 8, 2),
+						substr($time, 10, 2),
+						substr($time, 12, 2),
+						substr($time, 4, 2),
+						substr($time, 6, 2),
+						substr($time, 0, 4)
+						);
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -367,30 +390,33 @@
  * @param	string	format: us or euro
  * @return	string
  */	
-function unix_to_human($time = '', $seconds = FALSE, $fmt = 'us')
+if (! function_exists('unix_to_human'))
 {
-	$r  = date('Y', $time).'-'.date('m', $time).'-'.date('d', $time).' ';
+	function unix_to_human($time = '', $seconds = FALSE, $fmt = 'us')
+	{
+		$r  = date('Y', $time).'-'.date('m', $time).'-'.date('d', $time).' ';
 		
-	if ($fmt == 'us')
-	{
-		$r .= date('h', $time).':'.date('i', $time);
-	}
-	else
-	{
-		$r .= date('H', $time).':'.date('i', $time);
-	}
+		if ($fmt == 'us')
+		{
+			$r .= date('h', $time).':'.date('i', $time);
+		}
+		else
+		{
+			$r .= date('H', $time).':'.date('i', $time);
+		}
 	
-	if ($seconds)
-	{
-		$r .= ':'.date('s', $time);
-	}
+		if ($seconds)
+		{
+			$r .= ':'.date('s', $time);
+		}
 	
-	if ($fmt == 'us')
-	{
-		$r .= ' '.date('A', $time);
-	}
+		if ($fmt == 'us')
+		{
+			$r .= ' '.date('A', $time);
+		}
 		
-	return $r;
+		return $r;
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -404,59 +430,62 @@
  * @param	string	format: us or euro
  * @return	integer
  */	
-function human_to_unix($datestr = '')
+if (! function_exists('human_to_unix'))
 {
-	if ($datestr == '')
+	function human_to_unix($datestr = '')
 	{
-		return FALSE;
-	}
+		if ($datestr == '')
+		{
+			return FALSE;
+		}
 	
-	$datestr = trim($datestr);
-	$datestr = preg_replace("/\040+/", "\040", $datestr);
+		$datestr = trim($datestr);
+		$datestr = preg_replace("/\040+/", "\040", $datestr);
 
-	if ( ! ereg("^[0-9]{2,4}\-[0-9]{1,2}\-[0-9]{1,2}\040[0-9]{1,2}:[0-9]{1,2}.*$", $datestr))
-	{
-		return FALSE;
-	}
+		if ( ! ereg("^[0-9]{2,4}\-[0-9]{1,2}\-[0-9]{1,2}\040[0-9]{1,2}:[0-9]{1,2}.*$", $datestr))
+		{
+			return FALSE;
+		}
 
-	$split = preg_split("/\040/", $datestr);
+		$split = preg_split("/\040/", $datestr);
 
-	$ex = explode("-", $split['0']);
+		$ex = explode("-", $split['0']);
 	
-	$year  = (strlen($ex['0']) == 2) ? '20'.$ex['0'] : $ex['0'];
-	$month = (strlen($ex['1']) == 1) ? '0'.$ex['1']  : $ex['1'];
-	$day   = (strlen($ex['2']) == 1) ? '0'.$ex['2']  : $ex['2'];
+		$year  = (strlen($ex['0']) == 2) ? '20'.$ex['0'] : $ex['0'];
+		$month = (strlen($ex['1']) == 1) ? '0'.$ex['1']  : $ex['1'];
+		$day   = (strlen($ex['2']) == 1) ? '0'.$ex['2']  : $ex['2'];
 
-	$ex = explode(":", $split['1']);
+		$ex = explode(":", $split['1']);
 	
-	$hour = (strlen($ex['0']) == 1) ? '0'.$ex['0'] : $ex['0'];
-	$min  = (strlen($ex['1']) == 1) ? '0'.$ex['1'] : $ex['1'];
+		$hour = (strlen($ex['0']) == 1) ? '0'.$ex['0'] : $ex['0'];
+		$min  = (strlen($ex['1']) == 1) ? '0'.$ex['1'] : $ex['1'];
 
-	if (isset($ex['2']) AND ereg("[0-9]{1,2}", $ex['2']))
-	{
-		$sec  = (strlen($ex['2']) == 1) ? '0'.$ex['2'] : $ex['2'];
-	}
-	else
-	{
-		// Unless specified, seconds get set to zero.
-		$sec = '00';
-	}
+		if (isset($ex['2']) AND ereg("[0-9]{1,2}", $ex['2']))
+		{
+			$sec  = (strlen($ex['2']) == 1) ? '0'.$ex['2'] : $ex['2'];
+		}
+		else
+		{
+			// Unless specified, seconds get set to zero.
+			$sec = '00';
+		}
 	
-	if (isset($split['2']))
-	{
-		$ampm = strtolower($split['2']);
+		if (isset($split['2']))
+		{
+			$ampm = strtolower($split['2']);
 		
-		if (substr($ampm, 0, 1) == 'p' AND $hour < 12)
-			$hour = $hour + 12;
+			if (substr($ampm, 0, 1) == 'p' AND $hour < 12)
+				$hour = $hour + 12;
 			
-		if (substr($ampm, 0, 1) == 'a' AND $hour == 12)
-			$hour =  '00';
+			if (substr($ampm, 0, 1) == 'a' AND $hour == 12)
+				$hour =  '00';
 			
-		if (strlen($hour) == 1)
-			$hour = '0'.$hour;
+			if (strlen($hour) == 1)
+				$hour = '0'.$hour;
+		}
+			
+		return mktime($hour, $min, $sec, $month, $day, $year);
 	}
-			
-	return mktime($hour, $min, $sec, $month, $day, $year);
 }
 	
 // ------------------------------------------------------------------------
@@ -472,32 +501,35 @@
  * @param	string	menu name
  * @return	string
  */	
-function timezone_menu($default = 'UTC', $class = "", $name = 'timezones')
+if (! function_exists('timezone_menu'))
 {
-	$CI =& get_instance();
-	$CI->lang->load('date');
-	
-	if ($default == 'GMT')
-		$default = 'UTC';
-
-	$menu = '<select name="'.$name.'"';
-	
-	if ($class != '')
+	function timezone_menu($default = 'UTC', $class = "", $name = 'timezones')
 	{
-		$menu .= ' class="'.$class.'"';
-	}
+		$CI =& get_instance();
+		$CI->lang->load('date');
 	
-	$menu .= ">\n";
+		if ($default == 'GMT')
+			$default = 'UTC';
+
+		$menu = '<select name="'.$name.'"';
 	
-	foreach (timezones() as $key => $val)
-	{
-		$selected = ($default == $key) ? " selected='selected'" : '';
-		$menu .= "<option value='{$key}'{$selected}>".$CI->lang->line($key)."</option>\n";
+		if ($class != '')
+		{
+			$menu .= ' class="'.$class.'"';
+		}
+	
+		$menu .= ">\n";
+	
+		foreach (timezones() as $key => $val)
+		{
+			$selected = ($default == $key) ? " selected='selected'" : '';
+			$menu .= "<option value='{$key}'{$selected}>".$CI->lang->line($key)."</option>\n";
+		}
+
+		$menu .= "</select>";
+
+		return $menu;
 	}
-
-	$menu .= "</select>";
-
-	return $menu;
 }
 	
 // ------------------------------------------------------------------------
@@ -512,54 +544,56 @@
  * @param	string	timezone
  * @return	string
  */	
-function timezones($tz = '')
+if (! function_exists('timezones'))
 {
-	// Note: Don't change the order of these even though
-	// some items appear to be in the wrong order
-		
-	$zones = array(
-					'UM12' => -12,
-					'UM11' => -11,
-					'UM10' => -10,
-					'UM9'  => -9,
-					'UM8'  => -8,
-					'UM7'  => -7,
-					'UM6'  => -6,
-					'UM5'  => -5,
-					'UM4'  => -4,
-					'UM25' => -2.5,
-					'UM3'  => -3,
-					'UM2'  => -2,
-					'UM1'  => -1,
-					'UTC'  => 0,
-					'UP1'  => +1,
-					'UP2'  => +2,
-					'UP3'  => +3,
-					'UP25' => +2.5,
-					'UP4'  => +4,
-					'UP35' => +3.5,
-					'UP5'  => +5,
-					'UP45' => +4.5,
-					'UP6'  => +6,
-					'UP7'  => +7,
-					'UP8'  => +8,
-					'UP9'  => +9,
-					'UP85' => +8.5,
-					'UP10' => +10,
-					'UP11' => +11,
-					'UP12' => +12
-				);
-				
-	if ($tz == '')
+	function timezones($tz = '')
 	{
-		return $zones;
+		// Note: Don't change the order of these even though
+		// some items appear to be in the wrong order
+		
+		$zones = array(
+						'UM12' => -12,
+						'UM11' => -11,
+						'UM10' => -10,
+						'UM9'  => -9,
+						'UM8'  => -8,
+						'UM7'  => -7,
+						'UM6'  => -6,
+						'UM5'  => -5,
+						'UM4'  => -4,
+						'UM25' => -2.5,
+						'UM3'  => -3,
+						'UM2'  => -2,
+						'UM1'  => -1,
+						'UTC'  => 0,
+						'UP1'  => +1,
+						'UP2'  => +2,
+						'UP3'  => +3,
+						'UP25' => +2.5,
+						'UP4'  => +4,
+						'UP35' => +3.5,
+						'UP5'  => +5,
+						'UP45' => +4.5,
+						'UP6'  => +6,
+						'UP7'  => +7,
+						'UP8'  => +8,
+						'UP9'  => +9,
+						'UP85' => +8.5,
+						'UP10' => +10,
+						'UP11' => +11,
+						'UP12' => +12
+					);
+				
+		if ($tz == '')
+		{
+			return $zones;
+		}
+	
+		if ($tz == 'GMT')
+			$tz = 'UTC';
+	
+		return ( ! isset($zones[$tz])) ? 0 : $zones[$tz];
 	}
-	
-	if ($tz == 'GMT')
-		$tz = 'UTC';
-	
-	return ( ! isset($zones[$tz])) ? 0 : $zones[$tz];
 }
 
-
 ?>
\ No newline at end of file
diff --git a/system/helpers/directory_helper.php b/system/helpers/directory_helper.php
index 4a499de..5a23944 100644
--- a/system/helpers/directory_helper.php
+++ b/system/helpers/directory_helper.php
@@ -39,29 +39,31 @@
  * @param	bool	whether to limit the result to the top level only
  * @return	array
  */	
-function directory_map($source_dir, $top_level_only = FALSE)
-{	
-	if ($fp = @opendir($source_dir))
-	{
-		$filedata = array();
-		while (FALSE !== ($file = readdir($fp)))
+if (! function_exists('directory_map'))
+{
+	function directory_map($source_dir, $top_level_only = FALSE)
+	{	
+		if ($fp = @opendir($source_dir))
 		{
-			if (@is_dir($source_dir.$file) && substr($file, 0, 1) != '.' AND $top_level_only == FALSE)
+			$filedata = array();
+			while (FALSE !== ($file = readdir($fp)))
 			{
-				$temp_array = array();
+				if (@is_dir($source_dir.$file) && substr($file, 0, 1) != '.' AND $top_level_only == FALSE)
+				{
+					$temp_array = array();
 				
-				$temp_array = directory_map($source_dir.$file."/");
+					$temp_array = directory_map($source_dir.$file."/");
 				
-				$filedata[$file] = $temp_array;
+					$filedata[$file] = $temp_array;
+				}
+				elseif (substr($file, 0, 1) != ".")
+				{
+					$filedata[] = $file;
+				}
 			}
-			elseif (substr($file, 0, 1) != ".")
-			{
-				$filedata[] = $file;
-			}
+			return $filedata;
 		}
-		return $filedata;
 	}
 }
 
-
 ?>
\ No newline at end of file
diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php
index e8bc2f7..2d0e737 100644
--- a/system/helpers/download_helper.php
+++ b/system/helpers/download_helper.php
@@ -37,60 +37,62 @@
  * @param	mixed	the data to be downloaded
  * @return	void
  */	
-function force_download($filename = '', $data = '')
+if (! function_exists('force_download'))
 {
-	if ($filename == '' OR $data == '')
+	function force_download($filename = '', $data = '')
 	{
-		return FALSE;
-	}
+		if ($filename == '' OR $data == '')
+		{
+			return FALSE;
+		}
 
-	// Try to determine if the filename includes a file extension.
-	// We need it in order to set the MIME type
-	if (FALSE === strpos($filename, '.'))
-	{
-		return FALSE;
-	}
+		// Try to determine if the filename includes a file extension.
+		// We need it in order to set the MIME type
+		if (FALSE === strpos($filename, '.'))
+		{
+			return FALSE;
+		}
 	
-	// Grab the file extension
-	$x = explode('.', $filename);
-	$extension = end($x);
+		// Grab the file extension
+		$x = explode('.', $filename);
+		$extension = end($x);
 
-	// Load the mime types
-	@include(APPPATH.'config/mimes'.EXT);
+		// Load the mime types
+		@include(APPPATH.'config/mimes'.EXT);
 	
-	// Set a default mime if we can't find it
-	if ( ! isset($mimes[$extension]))
-	{
-		$mime = 'application/octet-stream';
-	}
-	else
-	{
-		$mime = (is_array($mimes[$extension])) ? $mimes[$extension][0] : $mimes[$extension];
-	}
+		// Set a default mime if we can't find it
+		if ( ! isset($mimes[$extension]))
+		{
+			$mime = 'application/octet-stream';
+		}
+		else
+		{
+			$mime = (is_array($mimes[$extension])) ? $mimes[$extension][0] : $mimes[$extension];
+		}
 	
-	// Generate the server headers
-	if (strstr($_SERVER['HTTP_USER_AGENT'], "MSIE"))
-	{
-		header('Content-Type: "'.$mime.'"');
-		header('Content-Disposition: attachment; filename="'.$filename.'"');
-		header('Expires: 0');
-		header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
-		header("Content-Transfer-Encoding: binary");
-		header('Pragma: public');
-		header("Content-Length: ".strlen($data));
-	}
-	else
-	{
-		header('Content-Type: "'.$mime.'"');
-		header('Content-Disposition: attachment; filename="'.$filename.'"');
-		header("Content-Transfer-Encoding: binary");
-		header('Expires: 0');
-		header('Pragma: no-cache');
-		header("Content-Length: ".strlen($data));
-	}
+		// Generate the server headers
+		if (strstr($_SERVER['HTTP_USER_AGENT'], "MSIE"))
+		{
+			header('Content-Type: "'.$mime.'"');
+			header('Content-Disposition: attachment; filename="'.$filename.'"');
+			header('Expires: 0');
+			header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
+			header("Content-Transfer-Encoding: binary");
+			header('Pragma: public');
+			header("Content-Length: ".strlen($data));
+		}
+		else
+		{
+			header('Content-Type: "'.$mime.'"');
+			header('Content-Disposition: attachment; filename="'.$filename.'"');
+			header("Content-Transfer-Encoding: binary");
+			header('Expires: 0');
+			header('Pragma: no-cache');
+			header("Content-Length: ".strlen($data));
+		}
 	
-	echo $data;
+		echo $data;
+	}
 }
 
-
 ?>
\ No newline at end of file
diff --git a/system/helpers/email_helper.php b/system/helpers/email_helper.php
index b44fae5..e677afd 100644
--- a/system/helpers/email_helper.php
+++ b/system/helpers/email_helper.php
@@ -33,9 +33,12 @@
  * @access	public
  * @return	bool
  */	
-function valid_email($address)
+if (! function_exists('valid_email'))
 {
-	return ( ! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $address)) ? FALSE : TRUE;
+	function valid_email($address)
+	{
+		return ( ! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $address)) ? FALSE : TRUE;
+	}
 }
 
 // ------------------------------------------------------------------------
@@ -46,9 +49,12 @@
  * @access	public
  * @return	bool
  */	
-function send_email($recipient, $subject = 'Test email', $message = 'Hello World')
+if (! function_exists('send_email'))
 {
-	return mail($recipient, $subject, $message);
+	function send_email($recipient, $subject = 'Test email', $message = 'Hello World')
+	{
+		return mail($recipient, $subject, $message);
+	}
 }
 
 ?>
\ No newline at end of file
diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php
index 868561b..bbf3409 100644
--- a/system/helpers/file_helper.php
+++ b/system/helpers/file_helper.php
@@ -36,35 +36,38 @@
  * @param	string	path to file
  * @return	string
  */	
-function read_file($file)
+if (! function_exists('read_file'))
 {
-	if ( ! file_exists($file))
+	function read_file($file)
 	{
-		return FALSE;
-	}
+		if ( ! file_exists($file))
+		{
+			return FALSE;
+		}
 	
-	if (function_exists('file_get_contents'))
-	{
-		return file_get_contents($file);		
-	}
+		if (function_exists('file_get_contents'))
+		{
+			return file_get_contents($file);		
+		}
 
-	if ( ! $fp = @fopen($file, 'rb'))
-	{
-		return FALSE;
-	}
+		if ( ! $fp = @fopen($file, 'rb'))
+		{
+			return FALSE;
+		}
 		
-	flock($fp, LOCK_SH);
+		flock($fp, LOCK_SH);
 	
-	$data = '';
-	if (filesize($file) > 0)
-	{
-		$data =& fread($fp, filesize($file));
+		$data = '';
+		if (filesize($file) > 0)
+		{
+			$data =& fread($fp, filesize($file));
+		}
+
+		flock($fp, LOCK_UN);
+		fclose($fp);
+
+		return $data;
 	}
-
-	flock($fp, LOCK_UN);
-	fclose($fp);
-
-	return $data;
 }
 	
 // ------------------------------------------------------------------------
@@ -80,19 +83,22 @@
  * @param	string	file data
  * @return	bool
  */	
-function write_file($path, $data, $mode = 'wb')
+if (! function_exists('write_file'))
 {
-	if ( ! $fp = @fopen($path, $mode))
+	function write_file($path, $data, $mode = 'wb')
 	{
-		return FALSE;
-	}
+		if ( ! $fp = @fopen($path, $mode))
+		{
+			return FALSE;
+		}
 		
-	flock($fp, LOCK_EX);
-	fwrite($fp, $data);
-	flock($fp, LOCK_UN);
-	fclose($fp);	
+		flock($fp, LOCK_EX);
+		fwrite($fp, $data);
+		flock($fp, LOCK_UN);
+		fclose($fp);	
 
-	return TRUE;
+		return TRUE;
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -110,34 +116,37 @@
  * @param	bool	whether to delete any directories found in the path
  * @return	bool
  */	
-function delete_files($path, $del_dir = FALSE, $level = 0)
-{	
-	// Trim the trailing slash
-	$path = preg_replace("|^(.+?)/*$|", "\\1", $path);
+if (! function_exists('delete_files'))
+{
+	function delete_files($path, $del_dir = FALSE, $level = 0)
+	{	
+		// Trim the trailing slash
+		$path = preg_replace("|^(.+?)/*$|", "\\1", $path);
 			
-	if ( ! $current_dir = @opendir($path))
-		return;
+		if ( ! $current_dir = @opendir($path))
+			return;
 	
-	while(FALSE !== ($filename = @readdir($current_dir)))
-	{
-		if ($filename != "." and $filename != "..")
+		while(FALSE !== ($filename = @readdir($current_dir)))
 		{
-			if (is_dir($path.'/'.$filename))
+			if ($filename != "." and $filename != "..")
 			{
-				$level++;
-				delete_files($path.'/'.$filename, $del_dir, $level);
-			}
-			else
-			{
-				unlink($path.'/'.$filename);
+				if (is_dir($path.'/'.$filename))
+				{
+					$level++;
+					delete_files($path.'/'.$filename, $del_dir, $level);
+				}
+				else
+				{
+					unlink($path.'/'.$filename);
+				}
 			}
 		}
-	}
-	@closedir($current_dir);
+		@closedir($current_dir);
 	
-	if ($del_dir == TRUE AND $level > 0)
-	{
-		@rmdir($path);
+		if ($del_dir == TRUE AND $level > 0)
+		{
+			@rmdir($path);
+		}
 	}
 }
 
@@ -154,25 +163,28 @@
  * @param	bool	whether to include the path as part of the filename
  * @return	array
  */	
-function get_filenames($source_dir, $include_path = FALSE)
+if (! function_exists('get_filenames'))
 {
-	$_filedata = array();
-	
-	if ($fp = @opendir($source_dir))
+	function get_filenames($source_dir, $include_path = FALSE)
 	{
-		while (FALSE !== ($file = readdir($fp)))
+		$_filedata = array();
+	
+		if ($fp = @opendir($source_dir))
 		{
-			if (@is_dir($source_dir.$file) && substr($file, 0, 1) != '.')
+			while (FALSE !== ($file = readdir($fp)))
 			{
-				 get_filenames($source_dir.$file."/", $include_path);
-			}
-			elseif (substr($file, 0, 1) != ".")
-			{
+				if (@is_dir($source_dir.$file) && substr($file, 0, 1) != '.')
+				{
+					 get_filenames($source_dir.$file."/", $include_path);
+				}
+				elseif (substr($file, 0, 1) != ".")
+				{
 			
-				$_filedata[] = ($include_path == TRUE) ? $source_dir.$file : $file;
+					$_filedata[] = ($include_path == TRUE) ? $source_dir.$file : $file;
+				}
 			}
+			return $_filedata;
 		}
-		return $_filedata;
 	}
 }
 
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index a2bc200..7c3b16f 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -38,35 +38,38 @@
  * @param	array	a key/value pair hidden data
  * @return	string
  */	
-function form_open($action = '', $attributes = array(), $hidden = array())
+if (! function_exists('form_open'))
 {
-	$CI =& get_instance();
-
-	$action = ( strpos($action, '://') === FALSE) ? $CI->config->site_url($action) : $action;
-
-	$form = '<form action="'.$action.'"';
-	
-	if ( ! isset($attributes['method']))
+	function form_open($action = '', $attributes = array(), $hidden = array())
 	{
-		$form .= ' method="post"';
-	}
+		$CI =& get_instance();
+
+		$action = ( strpos($action, '://') === FALSE) ? $CI->config->site_url($action) : $action;
+
+		$form = '<form action="'.$action.'"';
 	
-	if (is_array($attributes) AND count($attributes) > 0)
-	{
-		foreach ($attributes as $key => $val)
+		if ( ! isset($attributes['method']))
 		{
-			$form .= ' '.$key.'="'.$val.'"';
+			$form .= ' method="post"';
 		}
-	}
 	
-	$form .= '>';
+		if (is_array($attributes) AND count($attributes) > 0)
+		{
+			foreach ($attributes as $key => $val)
+			{
+				$form .= ' '.$key.'="'.$val.'"';
+			}
+		}
+	
+		$form .= '>';
 
-	if (is_array($hidden) AND count($hidden > 0))
-	{
-		$form .= form_hidden($hidden);
-	}
+		if (is_array($hidden) AND count($hidden > 0))
+		{
+			$form .= form_hidden($hidden);
+		}
 	
-	return $form;
+		return $form;
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -82,10 +85,13 @@
  * @param	array	a key/value pair hidden data
  * @return	string
  */	
-function form_open_multipart($action, $attributes = array(), $hidden = array())
+if (! function_exists('form_open_multipart'))
 {
-	$attributes['enctype'] = 'multipart/form-data';
-	return form_open($action, $attributes, $hidden);
+	function form_open_multipart($action, $attributes = array(), $hidden = array())
+	{
+		$attributes['enctype'] = 'multipart/form-data';
+		return form_open($action, $attributes, $hidden);
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -101,20 +107,23 @@
  * @param	string
  * @return	string
  */	
-function form_hidden($name, $value = '')
+if (! function_exists('form_hidden'))
 {
-	if ( ! is_array($name))
+	function form_hidden($name, $value = '')
 	{
-		return '<input type="hidden" name="'.$name.'" value="'.form_prep($value).'" />';
-	}
+		if ( ! is_array($name))
+		{
+			return '<input type="hidden" name="'.$name.'" value="'.form_prep($value).'" />';
+		}
 
-	$form = '';
-	foreach ($name as $name => $value)
-	{
-		$form .= '<input type="hidden" name="'.$name.'" value="'.form_prep($value).'" />';
-	}
+		$form = '';
+		foreach ($name as $name => $value)
+		{
+			$form .= '<input type="hidden" name="'.$name.'" value="'.form_prep($value).'" />';
+		}
 	
-	return $form;
+		return $form;
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -128,11 +137,14 @@
  * @param	string
  * @return	string
  */	
-function form_input($data = '', $value = '', $extra = '')
+if (! function_exists('form_input'))
 {
-	$defaults = array('type' => 'text', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value, 'maxlength' => '500', 'size' => '50');
+	function form_input($data = '', $value = '', $extra = '')
+	{
+		$defaults = array('type' => 'text', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value, 'maxlength' => '500', 'size' => '50');
 
-	return "<input ".parse_form_attributes($data, $defaults).$extra." />\n";
+		return "<input ".parse_form_attributes($data, $defaults).$extra." />\n";
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -148,15 +160,18 @@
  * @param	string
  * @return	string
  */	
-function form_password($data = '', $value = '', $extra = '')
+if (! function_exists('form_password'))
 {
-	if ( ! is_array($data))
+	function form_password($data = '', $value = '', $extra = '')
 	{
-		$data = array('name' => $data);
-	}
+		if ( ! is_array($data))
+		{
+			$data = array('name' => $data);
+		}
 
-	$data['type'] = 'password';
-	return form_input($data, $value, $extra);
+		$data['type'] = 'password';
+		return form_input($data, $value, $extra);
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -172,15 +187,18 @@
  * @param	string
  * @return	string
  */	
-function form_upload($data = '', $value = '', $extra = '')
+if (! function_exists('form_upload'))
 {
-	if ( ! is_array($data))
+	function form_upload($data = '', $value = '', $extra = '')
 	{
-		$data = array('name' => $data);
-	}
+		if ( ! is_array($data))
+		{
+			$data = array('name' => $data);
+		}
 
-	$data['type'] = 'file';
-	return form_input($data, $value, $extra);
+		$data['type'] = 'file';
+		return form_input($data, $value, $extra);
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -194,21 +212,24 @@
  * @param	string
  * @return	string
  */	
-function form_textarea($data = '', $value = '', $extra = '')
+if (! function_exists('form_textarea'))
 {
-	$defaults = array('name' => (( ! is_array($data)) ? $data : ''), 'cols' => '90', 'rows' => '12');
+	function form_textarea($data = '', $value = '', $extra = '')
+	{
+		$defaults = array('name' => (( ! is_array($data)) ? $data : ''), 'cols' => '90', 'rows' => '12');
 	
-    if ( ! is_array($data) OR ! isset($data['value']))
-	{
-		$val = $value;
-	}
-    else
-	{
-		$val = $data['value']; 
-		unset($data['value']); // textareas don't use the value attribute
-	}
+	    if ( ! is_array($data) OR ! isset($data['value']))
+		{
+			$val = $value;
+		}
+	    else
+		{
+			$val = $data['value']; 
+			unset($data['value']); // textareas don't use the value attribute
+		}
 		
-	return "<textarea ".parse_form_attributes($data, $defaults).$extra.">".$val."</textarea>\n";
+		return "<textarea ".parse_form_attributes($data, $defaults).$extra.">".$val."</textarea>\n";
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -223,32 +244,35 @@
  * @param	string
  * @return	string
  */	
-function form_dropdown($name = '', $options = array(), $selected = array(), $extra = '')
+if (! function_exists('form_dropdown'))
 {
-	if ( ! is_array($selected))
+	function form_dropdown($name = '', $options = array(), $selected = array(), $extra = '')
 	{
-		$selected = array($selected);
-	}
+		if ( ! is_array($selected))
+		{
+			$selected = array($selected);
+		}
 
-	if ($extra != '') $extra = ' '.$extra;
+		if ($extra != '') $extra = ' '.$extra;
 
-	$multiple = (count($selected) > 1 && strpos($extra, 'multiple') === FALSE) ? ' multiple="multiple"' : '';
+		$multiple = (count($selected) > 1 && strpos($extra, 'multiple') === FALSE) ? ' multiple="multiple"' : '';
 
-	$form = '<select name="'.$name.'"'.$extra.$multiple.">\n";
+		$form = '<select name="'.$name.'"'.$extra.$multiple.">\n";
 	
-	foreach ($options as $key => $val)
-	{
-		$key = (string) $key;
-		$val = (string) $val;
+		foreach ($options as $key => $val)
+		{
+			$key = (string) $key;
+			$val = (string) $val;
 		
-		$sel = (in_array($key, $selected))?' selected="selected"':'';
+			$sel = (in_array($key, $selected))?' selected="selected"':'';
 		
-		$form .= '<option value="'.$key.'"'.$sel.'>'.$val."</option>\n";
-	}
+			$form .= '<option value="'.$key.'"'.$sel.'>'.$val."</option>\n";
+		}
 
-	$form .= '</select>';
+		$form .= '</select>';
 	
-	return $form;
+		return $form;
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -263,30 +287,33 @@
  * @param	string
  * @return	string
  */	
-function form_checkbox($data = '', $value = '', $checked = TRUE, $extra = '')
+if (! function_exists('form_checkbox'))
 {
-	$defaults = array('type' => 'checkbox', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value);
-	
-	if (is_array($data) AND array_key_exists('checked', $data))
+	function form_checkbox($data = '', $value = '', $checked = TRUE, $extra = '')
 	{
-		$checked = $data['checked'];
-		
-		if ($checked == FALSE)
-		{
-			unset($data['checked']);
-		}
-		else
-		{
-			$data['checked'] = 'checked';
-		}
-	}
+		$defaults = array('type' => 'checkbox', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value);
 	
-	if ($checked == TRUE)
-		$defaults['checked'] = 'checked';
-	else
-		unset($defaults['checked']);
+		if (is_array($data) AND array_key_exists('checked', $data))
+		{
+			$checked = $data['checked'];
+		
+			if ($checked == FALSE)
+			{
+				unset($data['checked']);
+			}
+			else
+			{
+				$data['checked'] = 'checked';
+			}
+		}
+	
+		if ($checked == TRUE)
+			$defaults['checked'] = 'checked';
+		else
+			unset($defaults['checked']);
 
-	return "<input ".parse_form_attributes($data, $defaults).$extra." />\n";
+		return "<input ".parse_form_attributes($data, $defaults).$extra." />\n";
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -301,15 +328,18 @@
  * @param	string
  * @return	string
  */	
-function form_radio($data = '', $value = '', $checked = TRUE, $extra = '')
+if (! function_exists('form_radio'))
 {
-	if ( ! is_array($data))
-	{	
-		$data = array('name' => $data);
-	}
+	function form_radio($data = '', $value = '', $checked = TRUE, $extra = '')
+	{
+		if ( ! is_array($data))
+		{	
+			$data = array('name' => $data);
+		}
 
-	$data['type'] = 'radio';
-	return form_checkbox($data, $value, $checked, $extra);
+		$data['type'] = 'radio';
+		return form_checkbox($data, $value, $checked, $extra);
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -322,12 +352,15 @@
  * @param	string
  * @param	string
  * @return	string
- */	
-function form_submit($data = '', $value = '', $extra = '')
-{
-	$defaults = array('type' => 'submit', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value);
+ */
+if (! function_exists('form_submit'))
+{	
+	function form_submit($data = '', $value = '', $extra = '')
+	{
+		$defaults = array('type' => 'submit', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value);
 
-	return "<input ".parse_form_attributes($data, $defaults).$extra." />\n";
+		return "<input ".parse_form_attributes($data, $defaults).$extra." />\n";
+	}
 }
 
 // ------------------------------------------------------------------------
@@ -341,11 +374,14 @@
  * @param	string
  * @return	string
  */	
-function form_reset($data = '', $value = '', $extra = '')
+if (! function_exists('form_reset'))
 {
-	$defaults = array('type' => 'reset', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value);
+	function form_reset($data = '', $value = '', $extra = '')
+	{
+		$defaults = array('type' => 'reset', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value);
 
-	return "<input ".parse_form_attributes($data, $defaults).$extra." />\n";
+		return "<input ".parse_form_attributes($data, $defaults).$extra." />\n";
+	}
 }
 
 // ------------------------------------------------------------------------
@@ -359,27 +395,30 @@
  * @param	string	Additional attributes
  * @return	string
  */	
-function form_label($label_text = '', $id = '', $attributes = array())
+if (! function_exists('form_label'))
 {
+	function form_label($label_text = '', $id = '', $attributes = array())
+	{
 
-	$label = '<label';
+		$label = '<label';
 	
-	if ($id != '')
-	{
-		 $label .= " for=\"$id\"";
-	}
-		
-	if (is_array($attributes) AND count($attributes) > 0)
-	{
-		foreach ($attributes as $key => $val)
+		if ($id != '')
 		{
-			$label .= ' '.$key.'="'.$val.'"';
+			 $label .= " for=\"$id\"";
 		}
+		
+		if (is_array($attributes) AND count($attributes) > 0)
+		{
+			foreach ($attributes as $key => $val)
+			{
+				$label .= ' '.$key.'="'.$val.'"';
+			}
+		}
+
+		$label .= ">$label_text</label>";
+
+		return $label;
 	}
-
-	$label .= ">$label_text</label>";
-
-	return $label;
 }
 
 // ------------------------------------------------------------------------
@@ -394,29 +433,32 @@
  * @param	string	Additional attributes
  * @return	string
  */	
-function form_fieldset($legend_text = '', $attributes = array())
+if (! function_exists('form_fieldset'))
 {
-
-	$fieldset = "<fieldset";
-
-	if (is_array($attributes) AND count($attributes) > 0)
+	function form_fieldset($legend_text = '', $attributes = array())
 	{
-		foreach ($attributes as $key => $val)
+
+		$fieldset = "<fieldset";
+
+		if (is_array($attributes) AND count($attributes) > 0)
 		{
-			$fieldset .= ' '.$key.'="'.$val.'"';
+			foreach ($attributes as $key => $val)
+			{
+				$fieldset .= ' '.$key.'="'.$val.'"';
+			}
 		}
-	}
 	
-	$fieldset .= ">\n";
+		$fieldset .= ">\n";
 	
-	if ($legend_text != '')
-	{
-		$fieldset .= "<legend>$legend_text</legend>\n";
-	}
+		if ($legend_text != '')
+		{
+			$fieldset .= "<legend>$legend_text</legend>\n";
+		}
 		
 
 
-	return $fieldset;
+		return $fieldset;
+	}
 }
 
 // ------------------------------------------------------------------------
@@ -428,9 +470,12 @@
  * @param	string
  * @return	string
  */	
-function form_fieldset_close($extra = '')
+if (! function_exists('form_fieldset_close'))
 {
-	return "</fieldset>\n".$extra;
+	function form_fieldset_close($extra = '')
+	{
+		return "</fieldset>\n".$extra;
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -442,9 +487,12 @@
  * @param	string
  * @return	string
  */	
-function form_close($extra = '')
+if (! function_exists('form_close'))
 {
-	return "</form>\n".$extra;
+	function form_close($extra = '')
+	{
+		return "</form>\n".$extra;
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -458,30 +506,33 @@
  * @param	string
  * @return	string
  */	
-function form_prep($str = '')
+if (! function_exists('form_prep'))
 {
-	if ($str === '')
+	function form_prep($str = '')
 	{
-		return '';
+		if ($str === '')
+		{
+			return '';
+		}
+
+		$temp = '__TEMP_AMPERSANDS__';
+	
+		// Replace entities to temporary markers so that 
+		// htmlspecialchars won't mess them up
+		$str = preg_replace("/&#(\d+);/", "$temp\\1;", $str);
+		$str = preg_replace("/&(\w+);/",  "$temp\\1;", $str);
+
+		$str = htmlspecialchars($str);
+
+		// In case htmlspecialchars misses these.
+		$str = str_replace(array("'", '"'), array("&#39;", "&quot;"), $str);	
+	
+		// Decode the temp markers back to entities
+		$str = preg_replace("/$temp(\d+);/","&#\\1;",$str);
+		$str = preg_replace("/$temp(\w+);/","&\\1;",$str);	
+	
+		return $str;	
 	}
-
-	$temp = '__TEMP_AMPERSANDS__';
-	
-	// Replace entities to temporary markers so that 
-	// htmlspecialchars won't mess them up
-	$str = preg_replace("/&#(\d+);/", "$temp\\1;", $str);
-	$str = preg_replace("/&(\w+);/",  "$temp\\1;", $str);
-
-	$str = htmlspecialchars($str);
-
-	// In case htmlspecialchars misses these.
-	$str = str_replace(array("'", '"'), array("&#39;", "&quot;"), $str);	
-	
-	// Decode the temp markers back to entities
-	$str = preg_replace("/$temp(\d+);/","&#\\1;",$str);
-	$str = preg_replace("/$temp(\w+);/","&\\1;",$str);	
-	
-	return $str;	
 }
 	
 // ------------------------------------------------------------------------
@@ -496,37 +547,40 @@
  * @param	array
  * @return	string
  */	
-function parse_form_attributes($attributes, $default)
+if (! function_exists('parse_form_attributes'))
 {
-	if (is_array($attributes))
+	function parse_form_attributes($attributes, $default)
 	{
-		foreach ($default as $key => $val)
+		if (is_array($attributes))
 		{
-			if (isset($attributes[$key]))
+			foreach ($default as $key => $val)
 			{
-				$default[$key] = $attributes[$key];
-				unset($attributes[$key]);
+				if (isset($attributes[$key]))
+				{
+					$default[$key] = $attributes[$key];
+					unset($attributes[$key]);
+				}
+			}
+		
+			if (count($attributes) > 0)
+			{	
+				$default = array_merge($default, $attributes);
 			}
 		}
-		
-		if (count($attributes) > 0)
-		{	
-			$default = array_merge($default, $attributes);
-		}
-	}
 	
-	$att = '';
-	foreach ($default as $key => $val)
-	{
-		if ($key == 'value')
+		$att = '';
+		foreach ($default as $key => $val)
 		{
-			$val = form_prep($val);
-		}
+			if ($key == 'value')
+			{
+				$val = form_prep($val);
+			}
 	
-		$att .= $key . '="' . $val . '" ';
-	}
+			$att .= $key . '="' . $val . '" ';
+		}
 
-	return $att;
+		return $att;
+	}
 }
 
 ?>
\ No newline at end of file
diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php
index a11d23e..56e2531 100644
--- a/system/helpers/html_helper.php
+++ b/system/helpers/html_helper.php
@@ -38,9 +38,12 @@
  * @param	integer
  * @return	string
  */	
-function heading($data = '', $h = '1')
+if (! function_exists('heading'))
 {
-	return "<h".$h.">".$data."</h".$h.">";
+	function heading($data = '', $h = '1')
+	{
+		return "<h".$h.">".$data."</h".$h.">";
+	}
 }
 
 // ------------------------------------------------------------------------
@@ -55,9 +58,12 @@
  * @param	mixed
  * @return	string
  */	
-function ul($list, $attributes = '')
+if (! function_exists('ul'))
 {
-	return _list('ul', $list, $attributes);
+	function ul($list, $attributes = '')
+	{
+		return _list('ul', $list, $attributes);
+	}
 }
 
 // ------------------------------------------------------------------------
@@ -72,9 +78,12 @@
  * @param	mixed
  * @return	string
  */	
-function ol($list, $attributes = '')
+if (! function_exists('ol'))
 {
-	return _list('ol', $list, $attributes);
+	function ol($list, $attributes = '')
+	{
+		return _list('ol', $list, $attributes);
+	}
 }
 
 // ------------------------------------------------------------------------
@@ -91,63 +100,66 @@
  * @param	intiger		
  * @return	string
  */	
-function _list($type = 'ul', $list, $attributes = '', $depth = 0)
+if (! function_exists('_list'))
 {
-	// If an array wasn't submitted there's nothing to do...
-	if ( ! is_array($list))
+	function _list($type = 'ul', $list, $attributes = '', $depth = 0)
 	{
-		return $list;
-	}
-	
-	// Set the indentation based on the depth
-	$out = str_repeat(" ", $depth);
-	
-	// Were any attributes submitted?  If so generate a string
-	if (is_array($attributes))
-	{
-		$atts = '';
-		foreach ($attributes as $key => $val)
+		// If an array wasn't submitted there's nothing to do...
+		if ( ! is_array($list))
 		{
-			$atts .= ' ' . $key . '="' . $val . '"';
+			return $list;
 		}
-		$attributes = $atts;
-	}
 	
-	// Write the opening list tag
-	$out .= "<".$type.$attributes.">\n";
-
-	// Cycle through the list elements.  If an array is 
-	// encountered we will recursively call _list()
-
-	static $_last_list_item = '';
-	foreach ($list as $key => $val)
-	{	
-		$_last_list_item = $key;
-
-		$out .= str_repeat(" ", $depth + 2);
-		$out .= "<li>";
-		
-		if ( ! is_array($val))
+		// Set the indentation based on the depth
+		$out = str_repeat(" ", $depth);
+	
+		// Were any attributes submitted?  If so generate a string
+		if (is_array($attributes))
 		{
-			$out .= $val;
+			$atts = '';
+			foreach ($attributes as $key => $val)
+			{
+				$atts .= ' ' . $key . '="' . $val . '"';
+			}
+			$attributes = $atts;
 		}
-		else
-		{
-			$out .= $_last_list_item."\n";
-			$out .= _list($type, $val, '', $depth + 4);
+	
+		// Write the opening list tag
+		$out .= "<".$type.$attributes.">\n";
+
+		// Cycle through the list elements.  If an array is 
+		// encountered we will recursively call _list()
+
+		static $_last_list_item = '';
+		foreach ($list as $key => $val)
+		{	
+			$_last_list_item = $key;
+
 			$out .= str_repeat(" ", $depth + 2);
+			$out .= "<li>";
+		
+			if ( ! is_array($val))
+			{
+				$out .= $val;
+			}
+			else
+			{
+				$out .= $_last_list_item."\n";
+				$out .= _list($type, $val, '', $depth + 4);
+				$out .= str_repeat(" ", $depth + 2);
+			}
+
+			$out .= "</li>\n";		
 		}
 
-		$out .= "</li>\n";		
-	}
-
-	// Set the indentation for the closing tag
-	$out .= str_repeat(" ", $depth);
+		// Set the indentation for the closing tag
+		$out .= str_repeat(" ", $depth);
 	
-	// Write the closing list tag
-	$out .= "</".$type.">\n";
+		// Write the closing list tag
+		$out .= "</".$type.">\n";
 
-	return $out;
+		return $out;
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -159,9 +171,12 @@
  * @param	integer
  * @return	string
  */	
-function br($num = 1)
+if (! function_exists('br'))
 {
-	return str_repeat("<br />", $num);
+	function br($num = 1)
+	{
+		return str_repeat("<br />", $num);
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -173,9 +188,12 @@
  * @param	integer
  * @return	string
  */	
-function nbs($num = 1)
+if (! function_exists('nbs'))
 {
-	return str_repeat("&nbsp;", $num);
+	function nbs($num = 1)
+	{
+		return str_repeat("&nbsp;", $num);
+	}
 }
 
 // ------------------------------------------------------------------------
@@ -187,18 +205,18 @@
  * @param	array
  * @return	string
  */	
-function meta($meta = array(), $newline = "\n")
+if (! function_exists('meta'))
 {
-	$str = '';
-	foreach ($meta as $key => $val)
+	function meta($meta = array(), $newline = "\n")
 	{
-		$str .= '<meta http-equiv="'.$key.'" content="'.$val.'" />'.$newline;
+		$str = '';
+		foreach ($meta as $key => $val)
+		{
+			$str .= '<meta http-equiv="'.$key.'" content="'.$val.'" />'.$newline;
+		}
+
+		return $str;
 	}
-
-	return $str;
 }
 
-
-
-
 ?>
\ No newline at end of file
diff --git a/system/helpers/inflector_helper.php b/system/helpers/inflector_helper.php
index b1864cb..bf70a67 100644
--- a/system/helpers/inflector_helper.php
+++ b/system/helpers/inflector_helper.php
@@ -36,34 +36,36 @@
  * @access	public
  * @param	string
  * @return	str
- */		
-function singular($str)
-{
-    $str = strtolower(trim($str));
-    $end = substr($str, -3);
+ */	
+if (! function_exists('singular'))
+{	
+	function singular($str)
+	{
+	    $str = strtolower(trim($str));
+	    $end = substr($str, -3);
     
-    if ($end == 'ies')
-    {
-        $str = substr($str, 0, strlen($str)-3).'y';
-    }
-    elseif ($end == 'ses')
-    {
-        $str = substr($str, 0, strlen($str)-2);
-    }
-    else
-    {
-        $end = substr($str, -1);
+	    if ($end == 'ies')
+	    {
+	        $str = substr($str, 0, strlen($str)-3).'y';
+	    }
+	    elseif ($end == 'ses')
+	    {
+	        $str = substr($str, 0, strlen($str)-2);
+	    }
+	    else
+	    {
+	        $end = substr($str, -1);
         
-        if ($end == 's')
-        {
-            $str = substr($str, 0, strlen($str)-1);
-        }
-    }
+	        if ($end == 's')
+	        {
+	            $str = substr($str, 0, strlen($str)-1);
+	        }
+	    }
     
-    return $str;
+	    return $str;
+	}
 }
 
-
 // --------------------------------------------------------------------
 
 /**
@@ -75,32 +77,34 @@
  * @param	string
  * @param	bool
  * @return	str
- */		
-function plural($str, $force = FALSE)
-{
-    $str = strtolower(trim($str));
-    $end = substr($str, -1);
+ */	
+if (! function_exists('plural'))
+{	
+	function plural($str, $force = FALSE)
+	{
+	    $str = strtolower(trim($str));
+	    $end = substr($str, -1);
 
-    if ($end == 'y')
-    {
-        $str = substr($str, 0, strlen($str)-1).'ies';
-    }
-    elseif ($end == 's')
-    {
-        if ($force == TRUE)
-        {
-            $str .= 'es';
-        }
-    }
-    else
-    {
-        $str .= 's';
-    }
+	    if ($end == 'y')
+	    {
+	        $str = substr($str, 0, strlen($str)-1).'ies';
+	    }
+	    elseif ($end == 's')
+	    {
+	        if ($force == TRUE)
+	        {
+	            $str .= 'es';
+	        }
+	    }
+	    else
+	    {
+	        $str .= 's';
+	    }
 
-    return $str;
+	    return $str;
+	}
 }
 
-
 // --------------------------------------------------------------------
 
 /**
@@ -111,12 +115,15 @@
  * @access	public
  * @param	string
  * @return	str
- */		
-function camelize($str)
-{		
-	$str = 'x'.strtolower(trim($str));
-	$str = ucwords(preg_replace('/[\s_]+/', ' ', $str));
-	return substr(str_replace(' ', '', $str), 1);
+ */	
+if (! function_exists('camelize'))
+{	
+	function camelize($str)
+	{		
+		$str = 'x'.strtolower(trim($str));
+		$str = ucwords(preg_replace('/[\s_]+/', ' ', $str));
+		return substr(str_replace(' ', '', $str), 1);
+	}
 }
 
 // --------------------------------------------------------------------
@@ -129,10 +136,13 @@
  * @access	public
  * @param	string
  * @return	str
- */		
-function underscore($str)
+ */	
+if (! function_exists('underscore'))
 {
-	return preg_replace('/[\s]+/', '_', strtolower(trim($str)));
+	function underscore($str)
+	{
+		return preg_replace('/[\s]+/', '_', strtolower(trim($str)));
+	}
 }
 
 // --------------------------------------------------------------------
@@ -145,10 +155,13 @@
  * @access	public
  * @param	string
  * @return	str
- */		
-function humanize($str)
-{
-	return ucwords(preg_replace('/[_]+/', ' ', strtolower(trim($str))));
+ */	
+if (! function_exists('humanize'))
+{	
+	function humanize($str)
+	{
+		return ucwords(preg_replace('/[_]+/', ' ', strtolower(trim($str))));
+	}
 }
 	
 ?>
\ No newline at end of file
diff --git a/system/helpers/security_helper.php b/system/helpers/security_helper.php
index 97c9a6b..7552fd8 100644
--- a/system/helpers/security_helper.php
+++ b/system/helpers/security_helper.php
@@ -35,10 +35,13 @@
  * @param	string	the character set of your data
  * @return	string
  */	
-function xss_clean($str, $charset = 'ISO-8859-1')
+if (! function_exists('xss_clean'))
 {
-	$CI =& get_instance();
-	return $CI->input->xss_clean($str, $charset);
+	function xss_clean($str, $charset = 'ISO-8859-1')
+	{
+		$CI =& get_instance();
+		return $CI->input->xss_clean($str, $charset);
+	}
 }
 
 // --------------------------------------------------------------------
@@ -49,32 +52,35 @@
  * @access	public
  * @param	string
  * @return	string
- */		
-function dohash($str, $type = 'sha1')
-{
-	if ($type == 'sha1')
+ */	
+if (! function_exists('dohash'))
+{	
+	function dohash($str, $type = 'sha1')
 	{
-		if ( ! function_exists('sha1'))
+		if ($type == 'sha1')
 		{
-			if ( ! function_exists('mhash'))
-			{	
-				require_once(BASEPATH.'libraries/Sha1'.EXT);
-				$SH = new CI_SHA;
-				return $SH->generate($str);
+			if ( ! function_exists('sha1'))
+			{
+				if ( ! function_exists('mhash'))
+				{	
+					require_once(BASEPATH.'libraries/Sha1'.EXT);
+					$SH = new CI_SHA;
+					return $SH->generate($str);
+				}
+				else
+				{
+					return bin2hex(mhash(MHASH_SHA1, $str));
+				}
 			}
 			else
 			{
-				return bin2hex(mhash(MHASH_SHA1, $str));
-			}
+				return sha1($str);
+			}	
 		}
 		else
 		{
-			return sha1($str);
-		}	
-	}
-	else
-	{
-		return md5($str);
+			return md5($str);
+		}
 	}
 }
 	
@@ -87,12 +93,15 @@
  * @param	string
  * @return	string
  */	
-function strip_image_tags($str)
+if (! function_exists('strip_image_tags'))
 {
-	$str = preg_replace("#<img\s+.*?src\s*=\s*[\"'](.+?)[\"'].*?\>#", "\\1", $str);
-	$str = preg_replace("#<img\s+.*?src\s*=\s*(.+?).*?\>#", "\\1", $str);
+	function strip_image_tags($str)
+	{
+		$str = preg_replace("#<img\s+.*?src\s*=\s*[\"'](.+?)[\"'].*?\>#", "\\1", $str);
+		$str = preg_replace("#<img\s+.*?src\s*=\s*(.+?).*?\>#", "\\1", $str);
 			
-	return $str;
+		return $str;
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -104,9 +113,12 @@
  * @param	string
  * @return	string
  */	
-function encode_php_tags($str)
+if (! function_exists('encode_php_tags'))
 {
-	return str_replace(array('<?php', '<?PHP', '<?', '?>'),  array('&lt;?php', '&lt;?PHP', '&lt;?', '?&gt;'), $str);
+	function encode_php_tags($str)
+	{
+		return str_replace(array('<?php', '<?PHP', '<?', '?>'),  array('&lt;?php', '&lt;?PHP', '&lt;?', '?&gt;'), $str);
+	}
 }
 
 ?>
\ No newline at end of file
diff --git a/system/helpers/smiley_helper.php b/system/helpers/smiley_helper.php
index d61ea78..f414947 100644
--- a/system/helpers/smiley_helper.php
+++ b/system/helpers/smiley_helper.php
@@ -37,9 +37,11 @@
  * @param	string	field name
  * @return	string
  */	
-function js_insert_smiley($form_name = '', $form_field = '')
+if (! function_exists('js_insert_smiley'))
 {
-return <<<EOF
+	function js_insert_smiley($form_name = '', $form_field = '')
+	{
+		return <<<EOF
 <script type="text/javascript">
 	function insert_smiley(smiley)
 	{
@@ -47,8 +49,8 @@
 	}
 </script>
 EOF;
-}	
-
+	}	
+}
 // ------------------------------------------------------------------------
 
 /**
@@ -61,37 +63,40 @@
  * @param	string	the URL to the folder containing the smiley images
  * @return	array
  */	
-function get_clickable_smileys($image_url = '', $smileys = NULL)
+if (! function_exists('get_clickable_smileys'))
 {
-	if ( ! is_array($smileys))
+	function get_clickable_smileys($image_url = '', $smileys = NULL)
 	{
-		if (FALSE === ($smileys = _get_smiley_array()))
+		if ( ! is_array($smileys))
 		{
-			return $str;
-		}        
-	}
+			if (FALSE === ($smileys = _get_smiley_array()))
+			{
+				return $str;
+			}        
+		}
 
-	// Add a trailing slash to the file path if needed
-	$image_url = preg_replace("/(.+?)\/*$/", "\\1/",  $image_url);
+		// Add a trailing slash to the file path if needed
+		$image_url = preg_replace("/(.+?)\/*$/", "\\1/",  $image_url);
 	
-	$used = array();
-	foreach ($smileys as $key => $val)
-	{
-		// Keep duplicates from being used, which can happen if the
-		// mapping array contains multiple identical replacements.  For example:
-		// :-) and :) might be replaced with the same image so both smileys
-		// will be in the array.
-		if (isset($used[$smileys[$key][0]]))
+		$used = array();
+		foreach ($smileys as $key => $val)
 		{
-			continue;
+			// Keep duplicates from being used, which can happen if the
+			// mapping array contains multiple identical replacements.  For example:
+			// :-) and :) might be replaced with the same image so both smileys
+			// will be in the array.
+			if (isset($used[$smileys[$key][0]]))
+			{
+				continue;
+			}
+	
+			$link[] = "<a href=\"javascript:void(0);\" onClick=\"insert_smiley('".$key."')\"><img src=\"".$image_url.$smileys[$key][0]."\" width=\"".$smileys[$key][1]."\" height=\"".$smileys[$key][2]."\" alt=\"".$smileys[$key][3]."\" style=\"border:0;\" /></a>";	
+	
+			$used[$smileys[$key][0]] = TRUE;
 		}
 	
-		$link[] = "<a href=\"javascript:void(0);\" onClick=\"insert_smiley('".$key."')\"><img src=\"".$image_url.$smileys[$key][0]."\" width=\"".$smileys[$key][1]."\" height=\"".$smileys[$key][2]."\" alt=\"".$smileys[$key][3]."\" style=\"border:0;\" /></a>";	
-	
-		$used[$smileys[$key][0]] = TRUE;
+		return $link;
 	}
-	
-	return $link;
 }
 
 // ------------------------------------------------------------------------
@@ -106,30 +111,33 @@
  * @param	string	the URL to the folder containing the smiley images
  * @return	string
  */	
-function parse_smileys($str = '', $image_url = '', $smileys = NULL)
+if (! function_exists('parse_smileys'))
 {
-	if ($image_url == '')
+	function parse_smileys($str = '', $image_url = '', $smileys = NULL)
 	{
-		return $str;
-	}
-
-	if ( ! is_array($smileys))
-	{
-		if (FALSE === ($smileys = _get_smiley_array()))
+		if ($image_url == '')
 		{
 			return $str;
-		}        
-	}
-	
-	// Add a trailing slash to the file path if needed
-	$image_url = preg_replace("/(.+?)\/*$/", "\\1/",  $image_url);
+		}
 
-	foreach ($smileys as $key => $val)
-	{        
-		$str = str_replace($key, "<img src=\"".$image_url.$smileys[$key][0]."\" width=\"".$smileys[$key][1]."\" height=\"".$smileys[$key][2]."\" alt=\"".$smileys[$key][3]."\" style=\"border:0;\" />", $str);
-	}
+		if ( ! is_array($smileys))
+		{
+			if (FALSE === ($smileys = _get_smiley_array()))
+			{
+				return $str;
+			}        
+		}
 	
-	return $str;
+		// Add a trailing slash to the file path if needed
+		$image_url = preg_replace("/(.+?)\/*$/", "\\1/",  $image_url);
+
+		foreach ($smileys as $key => $val)
+		{        
+			$str = str_replace($key, "<img src=\"".$image_url.$smileys[$key][0]."\" width=\"".$smileys[$key][1]."\" height=\"".$smileys[$key][2]."\" alt=\"".$smileys[$key][3]."\" style=\"border:0;\" />", $str);
+		}
+	
+		return $str;
+	}
 }
 
 // ------------------------------------------------------------------------
@@ -142,24 +150,24 @@
  * @access	private
  * @return	mixed
  */	
-function _get_smiley_array()
+if (! function_exists('_get_smiley_array'))
 {
-	if ( ! file_exists(APPPATH.'config/smileys'.EXT))
+	function _get_smiley_array()
 	{
-		return FALSE;
-	}
+		if ( ! file_exists(APPPATH.'config/smileys'.EXT))
+		{
+			return FALSE;
+		}
 
-	include(APPPATH.'config/smileys'.EXT);
+		include(APPPATH.'config/smileys'.EXT);
 	
-	if ( ! isset($smileys) OR ! is_array($smileys))
-	{
-		return FALSE;
+		if ( ! isset($smileys) OR ! is_array($smileys))
+		{
+			return FALSE;
+		}
+	
+		return $smileys;
 	}
-	
-	return $smileys;
 }
 
-
-
-
 ?>
\ No newline at end of file
diff --git a/system/helpers/string_helper.php b/system/helpers/string_helper.php
index 42bcd57..f68f44a 100644
--- a/system/helpers/string_helper.php
+++ b/system/helpers/string_helper.php
@@ -42,10 +42,13 @@
  * @param	string
  * @return	string
  */	
-function trim_slashes($str)
+if (! function_exists('trim_slashes'))
 {
-    return trim($str, '/');
-} 
+	function trim_slashes($str)
+	{
+	    return trim($str, '/');
+	} 
+}
 	
 // ------------------------------------------------------------------------
 
@@ -58,21 +61,24 @@
  * @param	mixed	string or array
  * @return	mixed	string or array
  */	
- function strip_slashes($str)
- {
-	if (is_array($str))
-	{	
-		foreach ($str as $key => $val)
-		{
-			$str[$key] = strip_slashes($val);
-		}
-	}
-	else
+if (! function_exists('strip_slashes'))
+{
+	function strip_slashes($str)
 	{
-		$str = stripslashes($str);
-	}
+		if (is_array($str))
+		{	
+			foreach ($str as $key => $val)
+			{
+				$str[$key] = strip_slashes($val);
+			}
+		}
+		else
+		{
+			$str = stripslashes($str);
+		}
 	
-	return $str;
+		return $str;
+	}
 }
 
 // ------------------------------------------------------------------------
@@ -86,9 +92,12 @@
  * @param	string
  * @return	string
  */	
-function strip_quotes($str)
+if (! function_exists('strip_quotes'))
 {
-	return str_replace(array('"', "'"), '', $str);
+	function strip_quotes($str)
+	{
+		return str_replace(array('"', "'"), '', $str);
+	}
 }
 
 // ------------------------------------------------------------------------
@@ -102,9 +111,12 @@
  * @param	string
  * @return	string
  */	
-function quotes_to_entities($str)
-{	
-	return str_replace(array("\'","\"","'",'"'), array("&#39;","&quot;","&#39;","&quot;"), $str);
+if (! function_exists('quotes_to_entities'))
+{
+	function quotes_to_entities($str)
+	{	
+		return str_replace(array("\'","\"","'",'"'), array("&#39;","&quot;","&#39;","&quot;"), $str);
+	}
 }
 
 // ------------------------------------------------------------------------
@@ -124,9 +136,12 @@
  * @param	string
  * @return	string
  */	
-function reduce_double_slashes($str)
+if (! function_exists('reduce_double_slashes'))
 {
-	return preg_replace("#([^:])//+#", "\\1/", $str);
+	function reduce_double_slashes($str)
+	{
+		return preg_replace("#([^:])//+#", "\\1/", $str);
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -148,16 +163,19 @@
  * @param	bool	TRUE/FALSE - whether to trim the character from the beginning/end
  * @return	string
  */	
-function reduce_multiples($str, $character = ',', $trim = FALSE)
+if (! function_exists('reduce_multiples'))
 {
-	$str = preg_replace('#'.preg_quote($character, '#').'{2,}#', $character, $str);
-
-	if ($trim === TRUE)
+	function reduce_multiples($str, $character = ',', $trim = FALSE)
 	{
-		$str = trim($str, $character);
-	}
+		$str = preg_replace('#'.preg_quote($character, '#').'{2,}#', $character, $str);
+
+		if ($trim === TRUE)
+		{
+			$str = trim($str, $character);
+		}
     
-	return $str;
+		return $str;
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -171,36 +189,40 @@
  * @param	string 	type of random string.  Options: alunum, numeric, nozero, unique
  * @param	integer	number of characters
  * @return	string
- */	
-function random_string($type = 'alnum', $len = 8)
-{					
-	switch($type)
-	{
-		case 'alnum'	:
-		case 'numeric'	:
-		case 'nozero'	:
+ */
+if (! function_exists('random_string'))
+{	
+	function random_string($type = 'alnum', $len = 8)
+	{					
+		switch($type)
+		{
+			case 'alnum'	:
+			case 'numeric'	:
+			case 'nozero'	:
 		
-				switch ($type)
-				{
-					case 'alnum'	:	$pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
-						break;
-					case 'numeric'	:	$pool = '0123456789';
-						break;
-					case 'nozero'	:	$pool = '123456789';
-						break;
-				}
+					switch ($type)
+					{
+						case 'alnum'	:	$pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
+							break;
+						case 'numeric'	:	$pool = '0123456789';
+							break;
+						case 'nozero'	:	$pool = '123456789';
+							break;
+					}
 
-				$str = '';
-				for ($i=0; $i < $len; $i++)
-				{
-					$str .= substr($pool, mt_rand(0, strlen($pool) -1), 1);
-				}
-				return $str;
-		  break;
-		case 'unique' : return md5(uniqid(mt_rand()));
-		  break;
+					$str = '';
+					for ($i=0; $i < $len; $i++)
+					{
+						$str .= substr($pool, mt_rand(0, strlen($pool) -1), 1);
+					}
+					return $str;
+			  break;
+			case 'unique' : return md5(uniqid(mt_rand()));
+			  break;
+		}
 	}
 }
+
 // ------------------------------------------------------------------------
 
 /**
@@ -211,18 +233,21 @@
  * @access	public
  * @param	string (as many parameters as needed)
  * @return	string
- */		
-function alternator()
+ */	
+if (! function_exists('alternator'))
 {
-	static $i;	
-
-	if (func_num_args() == 0)
+	function alternator()
 	{
-		$i = 0;
-		return '';
+		static $i;	
+
+		if (func_num_args() == 0)
+		{
+			$i = 0;
+			return '';
+		}
+		$args = func_get_args();
+		return $args[($i++ % count($args))];
 	}
-	$args = func_get_args();
-	return $args[($i++ % count($args))];
 }
 
 // ------------------------------------------------------------------------
@@ -235,10 +260,12 @@
  * @param	integer	number of repeats
  * @return	string
  */	
-function repeater($data, $num = 1)
+if (! function_exists('repeater'))
 {
-	return (($num > 0) ? str_repeat($data, $num) : '');
-} 
-
+	function repeater($data, $num = 1)
+	{
+		return (($num > 0) ? str_repeat($data, $num) : '');
+	} 
+}
 
 ?>
\ No newline at end of file
diff --git a/system/helpers/text_helper.php b/system/helpers/text_helper.php
index 20bf323..30cec31 100644
--- a/system/helpers/text_helper.php
+++ b/system/helpers/text_helper.php
@@ -38,27 +38,30 @@
  * @param	string	the end character. Usually an ellipsis
  * @return	string
  */	
-function word_limiter($str, $n = 100, $end_char = '&#8230;')
+if (! function_exists('word_limiter'))
 {
-	if (strlen($str) < $n)
+	function word_limiter($str, $n = 100, $end_char = '&#8230;')
 	{
-		return $str;
-	}
+		if (strlen($str) < $n)
+		{
+			return $str;
+		}
 	
-	$words = explode(' ', preg_replace("/\s+/", ' ', preg_replace("/(\r\n|\r|\n)/", " ", $str)));
+		$words = explode(' ', preg_replace("/\s+/", ' ', preg_replace("/(\r\n|\r|\n)/", " ", $str)));
 	
-	if (count($words) <= $n)
-	{
-		return $str;
-	}
+		if (count($words) <= $n)
+		{
+			return $str;
+		}
 			
-	$str = '';
-	for ($i = 0; $i < $n; $i++)
-	{
-		$str .= $words[$i].' ';
-	}
+		$str = '';
+		for ($i = 0; $i < $n; $i++)
+		{
+			$str .= $words[$i].' ';
+		}
 
-	return trim($str).$end_char;
+		return trim($str).$end_char;
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -75,28 +78,31 @@
  * @param	string	the end character. Usually an ellipsis
  * @return	string
  */	
-function character_limiter($str, $n = 500, $end_char = '&#8230;')
+if (! function_exists('character_limiter'))
 {
-	if (strlen($str) < $n)
+	function character_limiter($str, $n = 500, $end_char = '&#8230;')
 	{
-		return $str;
-	}
-		
-	$str = preg_replace("/\s+/", ' ', preg_replace("/(\r\n|\r|\n)/", " ", $str));
-
-	if (strlen($str) <= $n)
-	{
-		return $str;
-	}
-									
-	$out = "";
-	foreach (explode(' ', trim($str)) as $val)
-	{
-		$out .= $val.' ';			
-		if (strlen($out) >= $n)
+		if (strlen($str) < $n)
 		{
-			return trim($out).$end_char;
-		}		
+			return $str;
+		}
+		
+		$str = preg_replace("/\s+/", ' ', preg_replace("/(\r\n|\r|\n)/", " ", $str));
+
+		if (strlen($str) <= $n)
+		{
+			return $str;
+		}
+									
+		$out = "";
+		foreach (explode(' ', trim($str)) as $val)
+		{
+			$out .= $val.' ';			
+			if (strlen($out) >= $n)
+			{
+				return trim($out).$end_char;
+			}		
+		}
 	}
 }
 	
@@ -111,41 +117,44 @@
  * @param	string
  * @return	string
  */	
-function ascii_to_entities($str)
+if (! function_exists('ascii_to_entities'))
 {
-   $count	= 1;
-   $out	= '';
-   $temp	= array();
+	function ascii_to_entities($str)
+	{
+	   $count	= 1;
+	   $out	= '';
+	   $temp	= array();
 	
-   for ($i = 0, $s = strlen($str); $i < $s; $i++)
-   {
-	   $ordinal = ord($str[$i]);
+	   for ($i = 0, $s = strlen($str); $i < $s; $i++)
+	   {
+		   $ordinal = ord($str[$i]);
 	
-	   if ($ordinal < 128)
-	   {
-		   $out .= $str[$i];
-	   }
-	   else
-	   {
-		   if (count($temp) == 0)
+		   if ($ordinal < 128)
 		   {
-			   $count = ($ordinal < 224) ? 2 : 3;
+			   $out .= $str[$i];
 		   }
-		
-		   $temp[] = $ordinal;
-		
-		   if (count($temp) == $count)
+		   else
 		   {
-			   $number = ($count == 3) ? (($temp['0'] % 16) * 4096) + (($temp['1'] % 64) * 64) + ($temp['2'] % 64) : (($temp['0'] % 32) * 64) + ($temp['1'] % 64);
+			   if (count($temp) == 0)
+			   {
+				   $count = ($ordinal < 224) ? 2 : 3;
+			   }
+		
+			   $temp[] = $ordinal;
+		
+			   if (count($temp) == $count)
+			   {
+				   $number = ($count == 3) ? (($temp['0'] % 16) * 4096) + (($temp['1'] % 64) * 64) + ($temp['2'] % 64) : (($temp['0'] % 32) * 64) + ($temp['1'] % 64);
 
-			   $out .= '&#'.$number.';';
-			   $count = 1;
-			   $temp = array();
+				   $out .= '&#'.$number.';';
+				   $count = 1;
+				   $temp = array();
+			   }
 		   }
 	   }
-   }
 
-   return $out;
+	   return $out;
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -160,45 +169,48 @@
  * @param	bool
  * @return	string
  */	
-function entities_to_ascii($str, $all = TRUE)
+if (! function_exists('entities_to_ascii'))
 {
-   if (preg_match_all('/\&#(\d+)\;/', $str, $matches))
-   {
-	   for ($i = 0, $s = count($matches['0']); $i < $s; $i++)
-	   {				
-		   $digits = $matches['1'][$i];
+	function entities_to_ascii($str, $all = TRUE)
+	{
+	   if (preg_match_all('/\&#(\d+)\;/', $str, $matches))
+	   {
+		   for ($i = 0, $s = count($matches['0']); $i < $s; $i++)
+		   {				
+			   $digits = $matches['1'][$i];
 
-		   $out = '';
+			   $out = '';
 
-		   if ($digits < 128)
-		   {
-			   $out .= chr($digits);
+			   if ($digits < 128)
+			   {
+				   $out .= chr($digits);
 		
-		   }
-		   elseif ($digits < 2048)
-		   {
-			   $out .= chr(192 + (($digits - ($digits % 64)) / 64));
-			   $out .= chr(128 + ($digits % 64));
-		   }
-		   else
-		   {
-			   $out .= chr(224 + (($digits - ($digits % 4096)) / 4096));
-			   $out .= chr(128 + ((($digits % 4096) - ($digits % 64)) / 64));
-			   $out .= chr(128 + ($digits % 64));
-		   }
+			   }
+			   elseif ($digits < 2048)
+			   {
+				   $out .= chr(192 + (($digits - ($digits % 64)) / 64));
+				   $out .= chr(128 + ($digits % 64));
+			   }
+			   else
+			   {
+				   $out .= chr(224 + (($digits - ($digits % 4096)) / 4096));
+				   $out .= chr(128 + ((($digits % 4096) - ($digits % 64)) / 64));
+				   $out .= chr(128 + ($digits % 64));
+			   }
 
-		   $str = str_replace($matches['0'][$i], $out, $str);				
+			   $str = str_replace($matches['0'][$i], $out, $str);				
+		   }
 	   }
-   }
 
-   if ($all)
-   {
-	   $str = str_replace(array("&amp;", "&lt;", "&gt;", "&quot;", "&apos;", "&#45;"),
-						  array("&","<",">","\"", "'", "-"),
-						  $str);
-   }
+	   if ($all)
+	   {
+		   $str = str_replace(array("&amp;", "&lt;", "&gt;", "&quot;", "&apos;", "&#45;"),
+							  array("&","<",">","\"", "'", "-"),
+							  $str);
+	   }
 
-   return $str;
+	   return $str;
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -216,27 +228,30 @@
  * @param	string	the optional replacement value
  * @return	string
  */	
-function word_censor($str, $censored, $replacement = '')
+if (! function_exists('word_censor'))
 {
-	if ( ! is_array($censored))
+	function word_censor($str, $censored, $replacement = '')
 	{
-		return $str;
-	}
+		if ( ! is_array($censored))
+		{
+			return $str;
+		}
 
-	$str = ' '.$str.' ';
-	foreach ($censored as $badword)
-	{
-		if ($replacement != '')
+		$str = ' '.$str.' ';
+		foreach ($censored as $badword)
 		{
-			$str = preg_replace("/\b(".str_replace('\*', '\w*?', preg_quote($badword)).")\b/i", $replacement, $str);
+			if ($replacement != '')
+			{
+				$str = preg_replace("/\b(".str_replace('\*', '\w*?', preg_quote($badword)).")\b/i", $replacement, $str);
+			}
+			else
+			{
+				$str = preg_replace("/\b(".str_replace('\*', '\w*?', preg_quote($badword)).")\b/ie", "str_repeat('#', strlen('\\1'))", $str);
+			}
 		}
-		else
-		{
-			$str = preg_replace("/\b(".str_replace('\*', '\w*?', preg_quote($badword)).")\b/ie", "str_repeat('#', strlen('\\1'))", $str);
-		}
-	}
 	
-	return trim($str);
+		return trim($str);
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -250,45 +265,48 @@
  * @param	string	the text string
  * @return	string
  */	
-function highlight_code($str)
-{		
-	// The highlight string function encodes and highlights
-	// brackets so we need them to start raw
-	$str = str_replace(array('&lt;', '&gt;'), array('<', '>'), $str);
+if (! function_exists('highlight_code'))
+{
+	function highlight_code($str)
+	{		
+		// The highlight string function encodes and highlights
+		// brackets so we need them to start raw
+		$str = str_replace(array('&lt;', '&gt;'), array('<', '>'), $str);
 	
-	// Replace any existing PHP tags to temporary markers so they don't accidentally
-	// break the string out of PHP, and thus, thwart the highlighting.
+		// Replace any existing PHP tags to temporary markers so they don't accidentally
+		// break the string out of PHP, and thus, thwart the highlighting.
 	
-	$str = str_replace(array('<?', '?>', '<%', '%>', '\\', '</script>'), 
-						array('phptagopen', 'phptagclose', 'asptagopen', 'asptagclose', 'backslashtmp', 'scriptclose'), $str);
+		$str = str_replace(array('<?', '?>', '<%', '%>', '\\', '</script>'), 
+							array('phptagopen', 'phptagclose', 'asptagopen', 'asptagclose', 'backslashtmp', 'scriptclose'), $str);
 
-	// The highlight_string function requires that the text be surrounded
-	// by PHP tags.  Since we don't know if A) the submitted text has PHP tags,
-	// or B) whether the PHP tags enclose the entire string, we will add our
-	// own PHP tags around the string along with some markers to make replacement easier later
+		// The highlight_string function requires that the text be surrounded
+		// by PHP tags.  Since we don't know if A) the submitted text has PHP tags,
+		// or B) whether the PHP tags enclose the entire string, we will add our
+		// own PHP tags around the string along with some markers to make replacement easier later
 	
-	$str = '<?php tempstart'."\n".$str.'tempend ?>';
+		$str = '<?php tempstart'."\n".$str.'tempend ?>';
 	
-	// All the magic happens here, baby!
-	$str = highlight_string($str, TRUE);
+		// All the magic happens here, baby!
+		$str = highlight_string($str, TRUE);
 
-	// Prior to PHP 5, the highlight function used icky font tags
-	// so we'll replace them with span tags.	
-	if (abs(phpversion()) < 5)
-	{
-		$str = str_replace(array('<font ', '</font>'), array('<span ', '</span>'), $str);
-		$str = preg_replace('#color="(.*?)"#', 'style="color: \\1"', $str);
-	}
+		// Prior to PHP 5, the highlight function used icky font tags
+		// so we'll replace them with span tags.	
+		if (abs(phpversion()) < 5)
+		{
+			$str = str_replace(array('<font ', '</font>'), array('<span ', '</span>'), $str);
+			$str = preg_replace('#color="(.*?)"#', 'style="color: \\1"', $str);
+		}
 	
-	// Remove our artificially added PHP
-	$str = preg_replace("#\<code\>.+?tempstart\<br />(?:\</span\>)?#is", "<code>\n", $str);
-	$str = preg_replace("#tempend.+#is", "</span>\n</code>", $str);	
+		// Remove our artificially added PHP
+		$str = preg_replace("#\<code\>.+?tempstart\<br />(?:\</span\>)?#is", "<code>\n", $str);
+		$str = preg_replace("#tempend.+#is", "</span>\n</code>", $str);	
 	
-	// Replace our markers back to PHP tags.
-	$str = str_replace(array('phptagopen', 'phptagclose', 'asptagopen', 'asptagclose', 'backslashtmp', 'scriptclose'),
-						array('&lt;?', '?&gt;', '&lt;%', '%&gt;', '\\', '&lt;/script&gt;'), $str);
+		// Replace our markers back to PHP tags.
+		$str = str_replace(array('phptagopen', 'phptagclose', 'asptagopen', 'asptagclose', 'backslashtmp', 'scriptclose'),
+							array('&lt;?', '?&gt;', '&lt;%', '%&gt;', '\\', '&lt;/script&gt;'), $str);
 										
-	return $str;
+		return $str;
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -305,19 +323,22 @@
  * @param	string	the closing tag to end the phrase with
  * @return	string
  */	
-function highlight_phrase($str, $phrase, $tag_open = '<strong>', $tag_close = '</strong>')
+if (! function_exists('highlight_phrase'))
 {
-	if ($str == '')
+	function highlight_phrase($str, $phrase, $tag_open = '<strong>', $tag_close = '</strong>')
 	{
-		return '';
-	}
+		if ($str == '')
+		{
+			return '';
+		}
 	
-	if ($phrase != '')
-	{
-		return preg_replace('/('.preg_quote($phrase, '/').')/i', $tag_open."\\1".$tag_close, $str);
-	}
+		if ($phrase != '')
+		{
+			return preg_replace('/('.preg_quote($phrase, '/').')/i', $tag_open."\\1".$tag_close, $str);
+		}
 
-	return $str;
+		return $str;
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -334,89 +355,91 @@
  * @param	integer	the number of characters to wrap at
  * @return	string
  */	
-function word_wrap($str, $charlim = '76')
+if (! function_exists('word_wrap'))
 {
-	// Se the character limit
-	if ( ! is_numeric($charlim))
-		$charlim = 76;
-	
-	// Reduce multiple spaces
-	$str = preg_replace("| +|", " ", $str);
-	
-	// Standardize newlines
-	$str = preg_replace("/\r\n|\r/", "\n", $str);
-	
-	// If the current word is surrounded by {unwrap} tags we'll 
-	// strip the entire chunk and replace it with a marker.
-	$unwrap = array();
-	if (preg_match_all("|(\{unwrap\}.+?\{/unwrap\})|s", $str, $matches))
+	function word_wrap($str, $charlim = '76')
 	{
-		for ($i = 0; $i < count($matches['0']); $i++)
-		{
-			$unwrap[] = $matches['1'][$i];				
-			$str = str_replace($matches['1'][$i], "{{unwrapped".$i."}}", $str);
-		}
-	}
+		// Se the character limit
+		if ( ! is_numeric($charlim))
+			$charlim = 76;
 	
-	// Use PHP's native function to do the initial wordwrap.  
-	// We set the cut flag to FALSE so that any individual words that are 
-	// too long get left alone.  In the next step we'll deal with them.
-	$str = wordwrap($str, $charlim, "\n", FALSE);
+		// Reduce multiple spaces
+		$str = preg_replace("| +|", " ", $str);
 	
-	// Split the string into individual lines of text and cycle through them
-	$output = "";
-	foreach (explode("\n", $str) as $line) 
-	{
-		// Is the line within the allowed character count?
-		// If so we'll join it to the output and continue
-		if (strlen($line) <= $charlim)
+		// Standardize newlines
+		$str = preg_replace("/\r\n|\r/", "\n", $str);
+	
+		// If the current word is surrounded by {unwrap} tags we'll 
+		// strip the entire chunk and replace it with a marker.
+		$unwrap = array();
+		if (preg_match_all("|(\{unwrap\}.+?\{/unwrap\})|s", $str, $matches))
 		{
-			$output .= $line."\n";			
-			continue;
-		}
-			
-		$temp = '';
-		while((strlen($line)) > $charlim) 
-		{
-			// If the over-length word is a URL we won't wrap it
-			if (preg_match("!\[url.+\]|://|wwww.!", $line))
+			for ($i = 0; $i < count($matches['0']); $i++)
 			{
-				break;
+				$unwrap[] = $matches['1'][$i];				
+				$str = str_replace($matches['1'][$i], "{{unwrapped".$i."}}", $str);
+			}
+		}
+	
+		// Use PHP's native function to do the initial wordwrap.  
+		// We set the cut flag to FALSE so that any individual words that are 
+		// too long get left alone.  In the next step we'll deal with them.
+		$str = wordwrap($str, $charlim, "\n", FALSE);
+	
+		// Split the string into individual lines of text and cycle through them
+		$output = "";
+		foreach (explode("\n", $str) as $line) 
+		{
+			// Is the line within the allowed character count?
+			// If so we'll join it to the output and continue
+			if (strlen($line) <= $charlim)
+			{
+				$output .= $line."\n";			
+				continue;
+			}
+			
+			$temp = '';
+			while((strlen($line)) > $charlim) 
+			{
+				// If the over-length word is a URL we won't wrap it
+				if (preg_match("!\[url.+\]|://|wwww.!", $line))
+				{
+					break;
+				}
+
+				// Trim the word down
+				$temp .= substr($line, 0, $charlim-1);
+				$line = substr($line, $charlim-1);
+			}
+		
+			// If $temp contains data it means we had to split up an over-length 
+			// word into smaller chunks so we'll add it back to our current line
+			if ($temp != '')
+			{
+				$output .= $temp . "\n" . $line; 
+			}
+			else
+			{
+				$output .= $line;
 			}
 
-			// Trim the word down
-			$temp .= substr($line, 0, $charlim-1);
-			$line = substr($line, $charlim-1);
-		}
-		
-		// If $temp contains data it means we had to split up an over-length 
-		// word into smaller chunks so we'll add it back to our current line
-		if ($temp != '')
-		{
-			$output .= $temp . "\n" . $line; 
-		}
-		else
-		{
-			$output .= $line;
+			$output .= "\n";
 		}
 
-		$output .= "\n";
+		// Put our markers back
+		if (count($unwrap) > 0)
+		{	
+			foreach ($unwrap as $key => $val)
+			{
+				$output = str_replace("{{unwrapped".$key."}}", $val, $output);
+			}
+		}
+
+		// Remove the unwrap tags
+		$output = str_replace(array('{unwrap}', '{/unwrap}'), '', $output);
+
+		return $output;	
 	}
-
-	// Put our markers back
-	if (count($unwrap) > 0)
-	{	
-		foreach ($unwrap as $key => $val)
-		{
-			$output = str_replace("{{unwrapped".$key."}}", $val, $output);
-		}
-	}
-
-	// Remove the unwrap tags
-	$output = str_replace(array('{unwrap}', '{/unwrap}'), '', $output);
-
-	return $output;	
 }
- 
 
 ?>
\ No newline at end of file
diff --git a/system/helpers/typography_helper.php b/system/helpers/typography_helper.php
index 4a746c6..4d9a1bb 100644
--- a/system/helpers/typography_helper.php
+++ b/system/helpers/typography_helper.php
@@ -34,28 +34,31 @@
  * @param	string
  * @return	string
  */	
-function nl2br_except_pre($str)
+if (! function_exists('nl2br_except_pre'))
 {
-	$ex = explode("pre>",$str);
-	$ct = count($ex);
-	
-	$newstr = "";
-	for ($i = 0; $i < $ct; $i++)
+	function nl2br_except_pre($str)
 	{
-		if (($i % 2) == 0)
-		{
-			$newstr .= nl2br($ex[$i]);
-		}
-		else
-		{
-			$newstr .= $ex[$i];
-		}
-		
-		if ($ct - 1 != $i)
-			$newstr .= "pre>";
-	}
+		$ex = explode("pre>",$str);
+		$ct = count($ex);
 	
-	return $newstr;
+		$newstr = "";
+		for ($i = 0; $i < $ct; $i++)
+		{
+			if (($i % 2) == 0)
+			{
+				$newstr .= nl2br($ex[$i]);
+			}
+			else
+			{
+				$newstr .= $ex[$i];
+			}
+		
+			if ($ct - 1 != $i)
+				$newstr .= "pre>";
+		}
+	
+		return $newstr;
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -68,10 +71,13 @@
  * @param	string
  * @return	string
  */
-function auto_typography($str)
+if (! function_exists('auto_typography'))
 {
-	$TYPE = new Auto_typography();
-	return $TYPE->convert($str);
+	function auto_typography($str)
+	{
+		$TYPE = new Auto_typography();
+		return $TYPE->convert($str);
+	}
 }
 	
 // ------------------------------------------------------------------------
diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php
index 9969af0..ad71caa 100644
--- a/system/helpers/url_helper.php
+++ b/system/helpers/url_helper.php
@@ -37,10 +37,13 @@
  * @param	string
  * @return	string
  */	
-function site_url($uri = '')
+if (! function_exists('site_url'))
 {
-	$CI =& get_instance();
-	return $CI->config->site_url($uri);
+	function site_url($uri = '')
+	{
+		$CI =& get_instance();
+		return $CI->config->site_url($uri);
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -53,10 +56,13 @@
  * @access	public
  * @return	string
  */	
-function base_url()
+if (! function_exists('base_url'))
 {
-	$CI =& get_instance();
-	return $CI->config->slash_item('base_url');
+	function base_url()
+	{
+		$CI =& get_instance();
+		return $CI->config->slash_item('base_url');
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -69,10 +75,13 @@
  * @access	public
  * @return	string
  */	
-function index_page()
+if (! function_exists('index_page'))
 {
-	$CI =& get_instance();
-	return $CI->config->item('index_page');
+	function index_page()
+	{
+		$CI =& get_instance();
+		return $CI->config->item('index_page');
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -88,34 +97,37 @@
  * @param	mixed	any attributes
  * @return	string
  */	
-function anchor($uri = '', $title = '', $attributes = '')
+if (! function_exists('anchor'))
 {
-	$title = (string) $title;
+	function anchor($uri = '', $title = '', $attributes = '')
+	{
+		$title = (string) $title;
 	
-	if ( ! is_array($uri))
-	{
-		$site_url = ( ! preg_match('!^\w+://!i', $uri)) ? site_url($uri) : $uri;
-	}
-	else
-	{
-		$site_url = site_url($uri);
-	}
+		if ( ! is_array($uri))
+		{
+			$site_url = ( ! preg_match('!^\w+://!i', $uri)) ? site_url($uri) : $uri;
+		}
+		else
+		{
+			$site_url = site_url($uri);
+		}
 	
-	if ($title == '')
-	{
-		$title = $site_url;
-	}
+		if ($title == '')
+		{
+			$title = $site_url;
+		}
 
-	if ($attributes == '')
-	{
-		$attributes = ' title="'.$title.'"';
-	}
-	else
-	{
-		$attributes = _parse_attributes($attributes);
-	}
+		if ($attributes == '')
+		{
+			$attributes = ' title="'.$title.'"';
+		}
+		else
+		{
+			$attributes = _parse_attributes($attributes);
+		}
 
-	return '<a href="'.$site_url.'"'.$attributes.'>'.$title.'</a>';
+		return '<a href="'.$site_url.'"'.$attributes.'>'.$title.'</a>';
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -132,33 +144,36 @@
  * @param	mixed	any attributes
  * @return	string
  */
-function anchor_popup($uri = '', $title = '', $attributes = FALSE)
-{	
-	$title = (string) $title;
+if (! function_exists('anchor_popup'))
+{
+	function anchor_popup($uri = '', $title = '', $attributes = FALSE)
+	{	
+		$title = (string) $title;
 	
-	$site_url = ( ! preg_match('!^\w+://!i', $uri)) ? site_url($uri) : $uri;
+		$site_url = ( ! preg_match('!^\w+://!i', $uri)) ? site_url($uri) : $uri;
 	
-	if ($title == '')
-	{
-		$title = $site_url;
-	}
+		if ($title == '')
+		{
+			$title = $site_url;
+		}
 	
-	if ($attributes === FALSE)
-	{
-		return "<a href='javascript:void(0);' onclick=\"window.open('".$site_url."', '_blank');\">".$title."</a>";
-	}
+		if ($attributes === FALSE)
+		{
+			return "<a href='javascript:void(0);' onclick=\"window.open('".$site_url."', '_blank');\">".$title."</a>";
+		}
 	
-	if ( ! is_array($attributes))
-	{
-		$attributes = array();
-	}
+		if ( ! is_array($attributes))
+		{
+			$attributes = array();
+		}
 		
-	foreach (array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0', ) as $key => $val)
-	{
-		$atts[$key] = ( ! isset($attributes[$key])) ? $val : $attributes[$key];
-	}
+		foreach (array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0', ) as $key => $val)
+		{
+			$atts[$key] = ( ! isset($attributes[$key])) ? $val : $attributes[$key];
+		}
 
-	return "<a href='javascript:void(0);' onclick=\"window.open('".$site_url."', '_blank', '"._parse_attributes($atts, TRUE)."');\">".$title."</a>";
+		return "<a href='javascript:void(0);' onclick=\"window.open('".$site_url."', '_blank', '"._parse_attributes($atts, TRUE)."');\">".$title."</a>";
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -172,18 +187,21 @@
  * @param	mixed 	any attributes
  * @return	string
  */
-function mailto($email, $title = '', $attributes = '')
+if (! function_exists('mailto'))
 {
-	$title = (string) $title;
-	
-	if ($title == "")
+	function mailto($email, $title = '', $attributes = '')
 	{
-		$title = $email;
+		$title = (string) $title;
+	
+		if ($title == "")
+		{
+			$title = $email;
+		}
+	
+		$attributes = _parse_attributes($attributes);
+	
+		return '<a href="mailto:'.$email.'"'.$attributes.'>'.$title.'</a>';
 	}
-	
-	$attributes = _parse_attributes($attributes);
-	
-	return '<a href="mailto:'.$email.'"'.$attributes.'>'.$title.'</a>';
 }
 	
 // ------------------------------------------------------------------------
@@ -199,100 +217,103 @@
  * @param	mixed 	any attributes
  * @return	string
  */
-function safe_mailto($email, $title = '', $attributes = '')
+if (! function_exists('safe_mailto'))
 {
-	$title = (string) $title;
-	
-	if ($title == "")
+	function safe_mailto($email, $title = '', $attributes = '')
 	{
-		$title = $email;
-	}
+		$title = (string) $title;
+	
+		if ($title == "")
+		{
+			$title = $email;
+		}
 					
-	for ($i = 0; $i < 16; $i++)
-	{
-		$x[] = substr('<a href="mailto:', $i, 1);
-	}
-	
-	for ($i = 0; $i < strlen($email); $i++)
-	{
-		$x[] = "|".ord(substr($email, $i, 1));
-	}
-
-	$x[] = '"';
-
-	if ($attributes != '')
-	{
-		if (is_array($attributes))
+		for ($i = 0; $i < 16; $i++)
 		{
-			foreach ($attributes as $key => $val)
+			$x[] = substr('<a href="mailto:', $i, 1);
+		}
+	
+		for ($i = 0; $i < strlen($email); $i++)
+		{
+			$x[] = "|".ord(substr($email, $i, 1));
+		}
+
+		$x[] = '"';
+
+		if ($attributes != '')
+		{
+			if (is_array($attributes))
 			{
-				$x[] =  ' '.$key.'="';
-				for ($i = 0; $i < strlen($val); $i++)
+				foreach ($attributes as $key => $val)
 				{
-					$x[] = "|".ord(substr($val, $i, 1));
+					$x[] =  ' '.$key.'="';
+					for ($i = 0; $i < strlen($val); $i++)
+					{
+						$x[] = "|".ord(substr($val, $i, 1));
+					}
+					$x[] = '"';
 				}
-				$x[] = '"';
 			}
-		}
-		else
-		{	
-			for ($i = 0; $i < strlen($attributes); $i++)
-			{
-				$x[] = substr($attributes, $i, 1);
+			else
+			{	
+				for ($i = 0; $i < strlen($attributes); $i++)
+				{
+					$x[] = substr($attributes, $i, 1);
+				}
 			}
-		}
-	}	
+		}	
 	
-	$x[] = '>';
+		$x[] = '>';
 	
-	$temp = array();
-	for ($i = 0; $i < strlen($title); $i++)
-	{
-		$ordinal = ord($title[$i]);
-	
-		if ($ordinal < 128)
+		$temp = array();
+		for ($i = 0; $i < strlen($title); $i++)
 		{
-			$x[] = "|".$ordinal;
-		}
-		else
-		{
-			if (count($temp) == 0)
+			$ordinal = ord($title[$i]);
+	
+			if ($ordinal < 128)
 			{
-				$count = ($ordinal < 224) ? 2 : 3;
+				$x[] = "|".$ordinal;
 			}
+			else
+			{
+				if (count($temp) == 0)
+				{
+					$count = ($ordinal < 224) ? 2 : 3;
+				}
 		
-			$temp[] = $ordinal;
-			if (count($temp) == $count)
-			{
-				$number = ($count == 3) ? (($temp['0'] % 16) * 4096) + (($temp['1'] % 64) * 64) + ($temp['2'] % 64) : (($temp['0'] % 32) * 64) + ($temp['1'] % 64);
-				$x[] = "|".$number;
-				$count = 1;
-				$temp = array();
+				$temp[] = $ordinal;
+				if (count($temp) == $count)
+				{
+					$number = ($count == 3) ? (($temp['0'] % 16) * 4096) + (($temp['1'] % 64) * 64) + ($temp['2'] % 64) : (($temp['0'] % 32) * 64) + ($temp['1'] % 64);
+					$x[] = "|".$number;
+					$count = 1;
+					$temp = array();
+				}
 			}
 		}
+	
+		$x[] = '<'; $x[] = '/'; $x[] = 'a'; $x[] = '>';
+	
+		$x = array_reverse($x);
+		ob_start();
+	
+	?><script type="text/javascript">
+	//<![CDATA[
+	var l=new Array();
+	<?php
+	$i = 0;
+	foreach ($x as $val){ ?>l[<?php echo $i++; ?>]='<?php echo $val; ?>';<?php } ?>
+
+	for (var i = l.length-1; i >= 0; i=i-1){
+	if (l[i].substring(0, 1) == '|') document.write("&#"+unescape(l[i].substring(1))+";");
+	else document.write(unescape(l[i]));}
+	//]]>
+	</script><?php
+
+		$buffer = ob_get_contents();
+		ob_end_clean();
+		return $buffer;
 	}
-	
-	$x[] = '<'; $x[] = '/'; $x[] = 'a'; $x[] = '>';
-	
-	$x = array_reverse($x);
-	ob_start();
-	
-?><script type="text/javascript">
-//<![CDATA[
-var l=new Array();
-<?php
-$i = 0;
-foreach ($x as $val){ ?>l[<?php echo $i++; ?>]='<?php echo $val; ?>';<?php } ?>
-
-for (var i = l.length-1; i >= 0; i=i-1){
-if (l[i].substring(0, 1) == '|') document.write("&#"+unescape(l[i].substring(1))+";");
-else document.write(unescape(l[i]));}
-//]]>
-</script><?php
-
-	$buffer = ob_get_contents();
-	ob_end_clean();
-	return $buffer;
 }
 	
 // ------------------------------------------------------------------------
@@ -311,55 +332,58 @@
  * @param	bool 	whether to create pop-up links
  * @return	string
  */
-function auto_link($str, $type = 'both', $popup = FALSE)
+if (! function_exists('auto_link'))
 {
-	if ($type != 'email')
-	{		
-		if (preg_match_all("#(^|\s|\()((http(s?)://)|(www\.))(\w+[^\s\)\<]+)#i", $str, $matches))
-		{
-			$pop = ($popup == TRUE) ? " target=\"_blank\" " : "";
-		
-			for ($i = 0; $i < sizeof($matches['0']); $i++)
+	function auto_link($str, $type = 'both', $popup = FALSE)
+	{
+		if ($type != 'email')
+		{		
+			if (preg_match_all("#(^|\s|\()((http(s?)://)|(www\.))(\w+[^\s\)\<]+)#i", $str, $matches))
 			{
-				$period = '';
-				if (preg_match("|\.$|", $matches['6'][$i]))
+				$pop = ($popup == TRUE) ? " target=\"_blank\" " : "";
+		
+				for ($i = 0; $i < sizeof($matches['0']); $i++)
 				{
-					$period = '.';
-					$matches['6'][$i] = substr($matches['6'][$i], 0, -1);
-				}
+					$period = '';
+					if (preg_match("|\.$|", $matches['6'][$i]))
+					{
+						$period = '.';
+						$matches['6'][$i] = substr($matches['6'][$i], 0, -1);
+					}
 			
-				$str = str_replace($matches['0'][$i],
-									$matches['1'][$i].'<a href="http'.
-									$matches['4'][$i].'://'.
-									$matches['5'][$i].
-									$matches['6'][$i].'"'.$pop.'>http'.
-									$matches['4'][$i].'://'.
-									$matches['5'][$i].
-									$matches['6'][$i].'</a>'.
-									$period, $str);
+					$str = str_replace($matches['0'][$i],
+										$matches['1'][$i].'<a href="http'.
+										$matches['4'][$i].'://'.
+										$matches['5'][$i].
+										$matches['6'][$i].'"'.$pop.'>http'.
+										$matches['4'][$i].'://'.
+										$matches['5'][$i].
+										$matches['6'][$i].'</a>'.
+										$period, $str);
+				}
 			}
 		}
-	}
 
-	if ($type != 'url')
-	{	
-		if (preg_match_all("/([a-zA-Z0-9_\.\-]+)@([a-zA-Z0-9\-]+)\.([a-zA-Z0-9\-\.]*)/i", $str, $matches))
-		{
-			for ($i = 0; $i < sizeof($matches['0']); $i++)
+		if ($type != 'url')
+		{	
+			if (preg_match_all("/([a-zA-Z0-9_\.\-]+)@([a-zA-Z0-9\-]+)\.([a-zA-Z0-9\-\.]*)/i", $str, $matches))
 			{
-				$period = '';
-				if (preg_match("|\.$|", $matches['3'][$i]))
+				for ($i = 0; $i < sizeof($matches['0']); $i++)
 				{
-					$period = '.';
-					$matches['3'][$i] = substr($matches['3'][$i], 0, -1);
-				}
+					$period = '';
+					if (preg_match("|\.$|", $matches['3'][$i]))
+					{
+						$period = '.';
+						$matches['3'][$i] = substr($matches['3'][$i], 0, -1);
+					}
 			
-				$str = str_replace($matches['0'][$i], safe_mailto($matches['1'][$i].'@'.$matches['2'][$i].'.'.$matches['3'][$i]).$period, $str);
-			}
+					$str = str_replace($matches['0'][$i], safe_mailto($matches['1'][$i].'@'.$matches['2'][$i].'.'.$matches['3'][$i]).$period, $str);
+				}
 		
+			}
 		}
+		return $str;
 	}
-	return $str;
 }
 	
 // ------------------------------------------------------------------------
@@ -373,19 +397,22 @@
  * @param	string	the URL
  * @return	string
  */
-function prep_url($str = '')
+if (! function_exists('prep_url'))
 {
-	if ($str == 'http://' OR $str == '')
+	function prep_url($str = '')
 	{
-		return '';
-	}
+		if ($str == 'http://' OR $str == '')
+		{
+			return '';
+		}
 	
-	if (substr($str, 0, 7) != 'http://' && substr($str, 0, 8) != 'https://')
-	{
-		$str = 'http://'.$str;
-	}
+		if (substr($str, 0, 7) != 'http://' && substr($str, 0, 8) != 'https://')
+		{
+			$str = 'http://'.$str;
+		}
 	
-	return $str;
+		return $str;
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -402,36 +429,39 @@
  * @param	string	the separator: dash, or underscore
  * @return	string
  */
-function url_title($str, $separator = 'dash')
+if (! function_exists('url_title'))
 {
-	if ($separator == 'dash')
+	function url_title($str, $separator = 'dash')
 	{
-		$search		= '_';
-		$replace	= '-';
-	}
-	else
-	{
-		$search		= '-';
-		$replace	= '_';
-	}
+		if ($separator == 'dash')
+		{
+			$search		= '_';
+			$replace	= '-';
+		}
+		else
+		{
+			$search		= '-';
+			$replace	= '_';
+		}
 		
-	$trans = array(
-					$search								=> $replace,
-					"\s+"								=> $replace,
-					"[^a-z0-9".$replace."]"				=> '',
-					$replace."+"						=> $replace,
-					$replace."$"						=> '',
-					"^".$replace						=> ''
-				   );
+		$trans = array(
+						$search								=> $replace,
+						"\s+"								=> $replace,
+						"[^a-z0-9".$replace."]"				=> '',
+						$replace."+"						=> $replace,
+						$replace."$"						=> '',
+						"^".$replace						=> ''
+					   );
 
-	$str = strip_tags(strtolower($str));
+		$str = strip_tags(strtolower($str));
 	
-	foreach ($trans as $key => $val)
-	{
-		$str = preg_replace("#".$key."#", $val, $str);
+		foreach ($trans as $key => $val)
+		{
+			$str = preg_replace("#".$key."#", $val, $str);
+		}
+	
+		return trim(stripslashes($str));
 	}
-	
-	return trim(stripslashes($str));
 }
 	
 // ------------------------------------------------------------------------
@@ -446,16 +476,19 @@
  * @param	string	the method: location or redirect
  * @return	string
  */
-function redirect($uri = '', $method = 'location')
+if (! function_exists('redirect'))
 {
-	switch($method)
+	function redirect($uri = '', $method = 'location')
 	{
-		case 'refresh'	: header("Refresh:0;url=".site_url($uri));
-			break;
-		default			: header("Location: ".site_url($uri));
-			break;
+		switch($method)
+		{
+			case 'refresh'	: header("Refresh:0;url=".site_url($uri));
+				break;
+			default			: header("Location: ".site_url($uri));
+				break;
+		}
+		exit;
 	}
-	exit;
 }
 	
 // ------------------------------------------------------------------------
@@ -470,32 +503,35 @@
  * @param	bool
  * @return	string
  */
-function _parse_attributes($attributes, $javascript = FALSE)
+if (! function_exists('_parse_attributes'))
 {
-	if (is_string($attributes))
+	function _parse_attributes($attributes, $javascript = FALSE)
 	{
-		return ($attributes != '') ? ' '.$attributes : '';
-	}
+		if (is_string($attributes))
+		{
+			return ($attributes != '') ? ' '.$attributes : '';
+		}
 
-	$att = '';
-	foreach ($attributes as $key => $val)
-	{
-		if ($javascript == TRUE)
+		$att = '';
+		foreach ($attributes as $key => $val)
 		{
-			$att .= $key . '=' . $val . ',';
+			if ($javascript == TRUE)
+			{
+				$att .= $key . '=' . $val . ',';
+			}
+			else
+			{
+				$att .= ' ' . $key . '="' . $val . '"';
+			}
 		}
-		else
+	
+		if ($javascript == TRUE AND $att != '')
 		{
-			$att .= ' ' . $key . '="' . $val . '"';
+			$att = substr($att, 0, -1);
 		}
-	}
 	
-	if ($javascript == TRUE AND $att != '')
-	{
-		$att = substr($att, 0, -1);
+		return $att;
 	}
-	
-	return $att;
 }
 
 ?>
\ No newline at end of file
diff --git a/system/helpers/xml_helper.php b/system/helpers/xml_helper.php
index 1a2c737..5aa6de9 100644
--- a/system/helpers/xml_helper.php
+++ b/system/helpers/xml_helper.php
@@ -34,25 +34,27 @@
  * @param	string
  * @return	string
  */	
-function xml_convert($str)
+if (! function_exists('xml_convert'))
 {
-	$temp = '__TEMP_AMPERSANDS__';
+	function xml_convert($str)
+	{
+		$temp = '__TEMP_AMPERSANDS__';
 
-	// Replace entities to temporary markers so that 
-	// ampersands won't get messed up
-	$str = preg_replace("/&#(\d+);/", "$temp\\1;", $str);
-	$str = preg_replace("/&(\w+);/",  "$temp\\1;", $str);
+		// Replace entities to temporary markers so that 
+		// ampersands won't get messed up
+		$str = preg_replace("/&#(\d+);/", "$temp\\1;", $str);
+		$str = preg_replace("/&(\w+);/",  "$temp\\1;", $str);
 	
-	$str = str_replace(array("&","<",">","\"", "'", "-"),
-					   array("&amp;", "&lt;", "&gt;", "&quot;", "&#39;", "&#45;"),
-					   $str);
+		$str = str_replace(array("&","<",">","\"", "'", "-"),
+						   array("&amp;", "&lt;", "&gt;", "&quot;", "&#39;", "&#45;"),
+						   $str);
 
-	// Decode the temp markers back to entities		
-	$str = preg_replace("/$temp(\d+);/","&#\\1;",$str);
-	$str = preg_replace("/$temp(\w+);/","&\\1;", $str);
+		// Decode the temp markers back to entities		
+		$str = preg_replace("/$temp(\d+);/","&#\\1;",$str);
+		$str = preg_replace("/$temp(\w+);/","&\\1;", $str);
 		
-	return $str;
+		return $str;
+	}
 }
 
-
 ?>
\ No newline at end of file
diff --git a/system/libraries/Loader.php b/system/libraries/Loader.php
index 320a43a..a59d6e3 100644
--- a/system/libraries/Loader.php
+++ b/system/libraries/Loader.php
@@ -366,8 +366,23 @@
 			{
 				continue;
 			}
+			
+			$ext_helper = APPPATH.'helpers/'.config_item('subclass_prefix').$helper.EXT;
 
-			if (file_exists(APPPATH.'helpers/'.$helper.EXT))
+			// Is this a helper extension request?			
+			if (file_exists($ext_helper))
+			{
+				$base_helper = BASEPATH.'helpers/'.$helper.EXT;
+				
+				if ( ! file_exists($base_helper))
+				{
+					show_error('Unable to load the requested file: helpers/'.$helper.EXT);
+				}
+				
+				include_once($ext_helper);
+				include_once($base_helper);
+			}
+			elseif (file_exists(APPPATH.'helpers/'.$helper.EXT))
 			{ 
 				include_once(APPPATH.'helpers/'.$helper.EXT);
 			}
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index d8a6740..d029f32 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -129,6 +129,7 @@
 	
 	<li>Helpers &amp; Plugins
 		<ul>
+			<li>Added ability to <a href="./general/helpers.html">"extend" Helpers</a>.</li>
 			<li>Added an <a href="./helpers/email_helper.html">email helper</a> into core helpers.</li>
 		    <li>Added <kbd>strip_quotes()</kbd> function to <a href="./helpers/string_helper.html">string helper</a>.</li>
 		    <li>Added <kbd>reduce_multiples()</kbd> function to <a href="./helpers/string_helper.html">string helper</a>.</li>
diff --git a/user_guide/general/helpers.html b/user_guide/general/helpers.html
index 0b83884..38ce768 100644
--- a/user_guide/general/helpers.html
+++ b/user_guide/general/helpers.html
@@ -116,6 +116,51 @@
 
 <p>Where "Click Here" is the name of the link, and "blog/comments" is the URI to the controller/function you wish to link to.</p>
 
+<h2>"Extending" Helpers</h2>
+
+<p>To "extend" Helpers, create a file in your <dfn>application/helpers/</dfn> folder with an identical name to the existing Helper, but prefixed with <kbd>MY_</kbd> (this item is configurable.  See below.).</p>
+
+<p>If all you need to do is add some functionality to an existing helper - perhaps add a function or two, or change how a particular
+	helper function operates - then it's overkill to replace the entire helper with your version.  In this case it's better to simply
+	"extend" the Helper.  The term "extend" is used loosely since Helper functions are procedural and discrete and cannot be extended
+	in the traditional programmatic sense.  Under the hood, this gives you the ability to add to the functions a Helper provides,
+	or to modify how the native Helper functions operate.</p>
+
+<p>For example, to extend the native <kbd>Array Helper</kbd> you'll create a file named <dfn>application/helpers/</dfn><kbd>MY_array_helper.php</kbd>, and add or override functions:</p>
+
+<code>
+// any_in_array() is not in the Array Helper, so it defines a new function<br />
+function any_in_array($needle, $haystack)<br />
+{<br />
+&nbsp;&nbsp;&nbsp;&nbsp;$needle = (is_array($needle)) ? $needle : array($needle);<br />
+	<br />
+&nbsp;&nbsp;&nbsp;&nbsp;foreach ($needle as $item)<br />
+&nbsp;&nbsp;&nbsp;&nbsp;{<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (in_array($item, $haystack))<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return TRUE;<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
+	<br />
+&nbsp;&nbsp;&nbsp;&nbsp;return FALSE;<br />
+}<br />
+<br />
+// random_element() is included in Array Helper, so it overrides the native function<br />
+function random_element($array)<br />
+{<br />
+&nbsp;&nbsp;&nbsp;&nbsp;shuffle($array);<br />
+&nbsp;&nbsp;&nbsp;&nbsp;return array_pop();<br />
+}<br />
+</code>
+
+<h3>Setting Your Own Prefix</h3>
+
+<p>The filename prefix for "extending" Helpers is the same used to extend libraries and Core classes.  To set your own prefix, open your <dfn>application/config/config.php</dfn> file and look for this item:</p>
+
+<code>$config['subclass_prefix'] = 'MY_';</code>
+
+<p>Please note that all native CodeIgniter libraries are prefixed with <kbd>CI_</kbd> so DO NOT use that as your prefix.</p>
+
 
 <h2>Now What?</h2>
 
